标签:style blog color div line size log ui
1 Layout l = textview.getLayout(); 2 if ( l != null){ 3 int lines = l.getLineCount(); 4 if ( lines > 0) 5 if ( l.getEllipsisCount(lines-1) > 0) 6 Log.d(TAG, "Text is ellipsized"); 7 }
textview有个特性,是当改变文字的时候getlayout为null,需要做一定的延时再获取
而且获取后不能在子线程中更新ui,会报错
判断textview是否被截断,布布扣,bubuko.com
标签:style blog color div line size log ui
原文地址:http://www.cnblogs.com/dongweiq/p/3875873.html