本文整理了Java中android.widget.TextView.onSizeChanged()
方法的一些代码示例,展示了TextView.onSizeChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.onSizeChanged()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:onSizeChanged
暂无
代码示例来源:origin: zjw-swun/AppMethodOrder
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
}
代码示例来源:origin: ZieIony/Carbon
@Override
protected void onSizeChanged(int width, int height, int oldwidth, int oldheight) {
super.onSizeChanged(width, height, oldwidth, oldheight);
if (width != oldwidth || height != oldheight)
adjustTextSize();
}
代码示例来源:origin: cymcsg/UltimateAndroid
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (w != oldw) {
refitText();
}
}
}
代码示例来源:origin: aa112901/remusic
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if(mWidth == 0){
Log.e(TAG,"*********************");
mWidth = getMeasuredWidth();
paint2 = getPaint();
//颜色渐变器
gradient = new LinearGradient(0, 0, mWidth, 0, new int[]{Color.GRAY,Color.WHITE,Color.GRAY}, new float[]{
0.3f,0.5f,1.0f
}, Shader.TileMode.CLAMP);
paint2.setShader(gradient);
matrix = new Matrix();
}
}
代码示例来源:origin: qiujuer/Genius-Android
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
Drawable drawable = mBorderDrawable;
if (drawable != null) {
drawable.setBounds(0, 0, getWidth(), getHeight());
}
}
代码示例来源:origin: smuyyh/BookReader
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
int left = (int) borderStrokeWidth;
int top = (int) borderStrokeWidth;
代码示例来源:origin: xinghongfei/LookLook
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (h > getMinimumHeight()) {
minOffset = getMinimumHeight() - h;
}
}
代码示例来源:origin: matrixxun/MaterialBadgeTextView
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
refreshBackgroundDrawable(w, h);
}
代码示例来源:origin: haibuzou/ExpandTable
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mwidth = w;
mheight = h;
}
}
代码示例来源:origin: zlc921022/CustomView
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mWidth = w;
mHeight = h;
}
代码示例来源:origin: lionoggo/FastApp
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mHeight = h;
}
代码示例来源:origin: githubwing/RichTextView
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mWidth = w;
}
/**
代码示例来源:origin: haibuzou/Calendar365
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
rect = new RectF(0,0,w,h);
}
}
代码示例来源:origin: com.albedinsky.android/ui-widget-common
/**
*/
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mDecorator.onSizeChanged(w, h, oldw, oldh);
}
代码示例来源:origin: mabeijianxi/ViewLargerImageUtil
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mDetector.onSizeChanged(w, h);
}
代码示例来源:origin: geniusgithub/AndroidDialer
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
ViewUtil.resizeText(this, mOriginalTextSize, mMinTextSize);
}
}
代码示例来源:origin: lguipeng/BubbleView
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (w > 0 && h > 0) {
setUp(w, h);
}
}
代码示例来源:origin: JackWHLiu/jackknife
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
viewWidth = getMeasuredWidth();
linearGradient = new LinearGradient(-viewWidth, 0, 0, 0, topColor, bottomColor, Shader.TileMode.CLAMP);
if (mPaint.getShader() == null) {
mPaint.setShader(linearGradient);
}
}
代码示例来源:origin: labexp/osmtracker-android
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
Log.v(TAG, "onSizeChanged: " + w + "," + h + ". Old: " + oldw + "," + oldh);
// Populate data from content provider
populateCoords();
// Project coordinates into 2D screen
projectData(w, h);
super.onSizeChanged(w, h, oldw, oldh);
}
代码示例来源:origin: moz1q1/WalleLibrary
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
mW = getWidth();
mH = getHeight();
}
内容来源于网络,如有侵权,请联系作者删除!