I have a multi-line TextView
that has android:ellipsize=\"end\"
set. I would like to know, however, if the string I place in there is actually too
it is working for me
if (l != null) {
int lines = l.getLineCount();
if (lines > 0) {
for (int i = 0; i < lines; i++) {
if (l.getEllipsisCount(i) > 0) {
ellipsize = true;
break;
}
}
}
}
This worked to me:
textView.post(new Runnable() {
@Override
public void run() {
if (textView.getLineCount() > 1) {
//do something
}
}
});