i have a string in the textView as:
<TextView
android:id="@+id/comment_concent"
android:maxLines="2"
android:textColor="#FFCD3333"
android:ellipsize="end"
android:layout_marginRight="5dip"
android:layout_width="210dip"
android:layout_height="50dip"
android:textSize="15sp"
android:text="aaddadadddddddddddddddddddddddddddddddddddddadddddddd"/>
sometime the text only “addadaddad”,in other words the string length is not fixed,so if the string is too long,you know the end is show”…”,my question is that how to know the string if end with”…”,if the string is end with”…”, i will call other methods to show the whole string.
Measure the text using paint object to see if it width is greater than textviews.
Edit:
Even better, just set textsize from textview instead of calculating, then measure text. Edited the above code.