You can use method: getEllipsisCount
public static boolean isTextTruncated( String text, TextView textView )
{
if ( textView != null && text != null )
{
Layout layout = textView.getLayout();
if ( layout != null )
{
int lines = layout.getLineCount();
if ( lines > 0 )
{
int ellipsisCount = layout.getEllipsisCount( lines - 1 );
if ( ellipsisCount > 0 )
{
return true;
}
}
}
}
return false;
}
I found the answer at the following related post:
Check if textview is ellipsized in android
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…