android.widget.TextView.onLayout()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(232)

本文整理了Java中android.widget.TextView.onLayout()方法的一些代码示例,展示了TextView.onLayout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.onLayout()方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:onLayout

TextView.onLayout介绍

暂无

代码示例

代码示例来源:origin: zjw-swun/AppMethodOrder

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
}

代码示例来源:origin: H07000223/FlycoTabLayout

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (isRadiusHalfHeight()) {
    setCornerRadius(getHeight() / 2);
  } else {
    setBgSelector();
  }
}

代码示例来源:origin: ZieIony/Carbon

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (!changed)
    return;
  if (getWidth() == 0 || getHeight() == 0)
    return;
  updateCorners();
  if (rippleDrawable != null)
    rippleDrawable.setBounds(0, 0, getWidth(), getHeight());
}

代码示例来源:origin: fanatic-mobile-developer-for-android/A-week-to-develop-android-app-plan

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
}

代码示例来源:origin: nspduanlei/Reader

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
}

代码示例来源:origin: Tamicer/TvFrameWork

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  Log.d(Tag, "onLayout()");
}

代码示例来源:origin: cpiz/BubbleView

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  mBubbleImpl.updateDrawable(right - left, bottom - top, true);
}

代码示例来源:origin: ShonLin/QuickDevFramework

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  radius = bottom - top;
  setBadgeBackground();
}

代码示例来源:origin: EvanRespaut/Equate

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (changed) layoutText();
}

代码示例来源:origin: luhaoaimama1/zone-sdk

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (!calExpand)
    setExpand();
}

代码示例来源:origin: timqi/CollapsibleTextView

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
 super.onLayout(changed, left, top, right, bottom);
 if (mShouldInitLayout && getLineCount() > mCollapsedLines) {
  mShouldInitLayout = false;
  applyState(mExpanded);
 }
}

代码示例来源:origin: dongorigin/AndroidDemo

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  L.d(TAG, "left %d top %d right %d bottom %d", left, top, right, bottom);
  if (left != mPreviousLeft || top != mPreviousTop || right != mPreviousRight || bottom != mPreviousBottom) {
    mPreviousLeft = left;
    mPreviousTop = top;
    mPreviousRight = right;
    mPreviousBottom = bottom;
    Rect touchRect = new Rect(left - padding, top - padding, right + padding, bottom + padding);
    View parent = (View) getParent();
    parent.setTouchDelegate(new TouchDelegate(touchRect, parent));
  }
}

代码示例来源:origin: Blankeer/MDWechat

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (isRadiusHalfHeight()) {
    setCornerRadius(getHeight() / 2);
  } else {
    setBgSelector();
  }
}

代码示例来源:origin: H07000223/FlycoRoundView

@Override
  protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
    super.onLayout(changed, left, top, right, bottom);
    if (delegate.isRadiusHalfHeight()) {
      delegate.setCornerRadius(getHeight() / 2);
    } else {
      delegate.setBgSelector();
    }
  }
}

代码示例来源:origin: JmStefanAndroid/EasyBehavior

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (isRadiusHalfHeight()) {
    setCornerRadius(getHeight() / 2);
  } else {
    setBgSelector();
  }
}

代码示例来源:origin: SelfZhangTQ/T-MVVM

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (isRadiusHalfHeight()) {
    setCornerRadius(getHeight() / 2);
  } else {
    setBgSelector();
  }
}

代码示例来源:origin: AriesHoo/UIWidget

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (delegate != null) {
    if (delegate.getRadiusHalfHeightEnable()) {
      delegate.setRadius(getHeight() / 2);
    }
    delegate.init();
  }
}

代码示例来源:origin: JmStefanAndroid/PVCloudGroupn

@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  super.onLayout(changed, left, top, right, bottom);
  if (isRadiusHalfHeight()) {
    setCornerRadius(getHeight() / 2);
  } else {
    setBgSelector();
  }
}

代码示例来源:origin: Sonelli/juicessh-performancemonitor

/**
 * Resize text after measuring
 */
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  if(changed || mNeedsResize) {
    int widthLimit = (right - left) - getCompoundPaddingLeft() - getCompoundPaddingRight();
    int heightLimit = (bottom - top) - getCompoundPaddingBottom() - getCompoundPaddingTop();
    resizeText(widthLimit, heightLimit);
  }
  super.onLayout(changed, left, top, right, bottom);
}

代码示例来源:origin: apptentive/apptentive-android

/**
 * Resize text after measuring
 */
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
  if (changed || mNeedsResize) {
    int widthLimit = (right - left) - getCompoundPaddingLeft() - getCompoundPaddingRight();
    int heightLimit = (bottom - top) - getCompoundPaddingBottom() - getCompoundPaddingTop();
    resizeText(widthLimit, heightLimit);
  }
  super.onLayout(changed, left, top, right, bottom);
}

相关文章

微信公众号

最新文章

更多

TextView类方法