本文整理了Java中android.widget.TextView.onLayout()
方法的一些代码示例,展示了TextView.onLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.onLayout()
方法的具体详情如下:
包路径:android.widget.TextView
类名称: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);
}
内容来源于网络,如有侵权,请联系作者删除!