本文整理了Java中android.widget.TextView.onTextChanged()
方法的一些代码示例,展示了TextView.onTextChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.onTextChanged()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:onTextChanged
暂无
代码示例来源:origin: ZieIony/Carbon
@Override
protected void onTextChanged(final CharSequence text, final int start, final int before, final int after) {
super.onTextChanged(text, start, before, after);
adjustTextSize();
}
代码示例来源:origin: cymcsg/UltimateAndroid
@Override
protected void onTextChanged(final CharSequence text, final int start,
final int lengthBefore, final int lengthAfter) {
super.onTextChanged(text, start, lengthBefore, lengthAfter);
refitText();
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
super.onTextChanged(text, start, lengthBefore, lengthAfter);
if(!(text!=null && text.length()>0)){
setVisibility(GONE);
}else{
setVisibility(VISIBLE);
}
}
代码示例来源:origin: matrixxun/MaterialBadgeTextView
@Override
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
super.onTextChanged(text, start, lengthBefore, lengthAfter);
/** 纯色小红点模式下若有文本需要从无变为有, 要归位view的大小.*/
String strText = text==null?"":text.toString().trim();
if(isHighLightMode && !"".equals(strText)){
ViewGroup.LayoutParams lp = getLayoutParams();
lp.height = ViewGroup.LayoutParams.WRAP_CONTENT;
lp.width = ViewGroup.LayoutParams.WRAP_CONTENT;
setLayoutParams(lp);
isHighLightMode = false;
}
}
代码示例来源:origin: geniusgithub/AndroidDialer
@Override
protected void onTextChanged(CharSequence text, int start, int lengthBefore, int lengthAfter) {
super.onTextChanged(text, start, lengthBefore, lengthAfter);
ViewUtil.resizeText(this, mOriginalTextSize, mMinTextSize);
}
代码示例来源:origin: EvanRespaut/Equate
@Override
protected void onTextChanged(CharSequence text, int start, int before, int after) {
super.onTextChanged(text, start, before, after);
layoutText();
}
代码示例来源:origin: songhanghang/FaceText
@Override
protected void onTextChanged(final CharSequence text,final int start,final int before,final int after)
{
super.onTextChanged(text,start,before,after);
reAdjust();
}
代码示例来源:origin: smuyyh/SprintNBA
@Override
protected void onTextChanged(CharSequence text, int start, int before, int after) {
super.onTextChanged(text, start, before, after);
refitText(text.toString(), this.getWidth());
}
内容来源于网络,如有侵权,请联系作者删除!