缩小TextView字体到两行
runnable = new Runnable() {
@Override
public void run() {
int lineCount = tv.getLineCount();
if (lineCount > 2) {
float textSize = tv.getTextSize();
textSize--;
tv.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
tv.post(runnable);
}
}
};
tv.post(runnable);