How to set maxLines and ellipsesize of a TextView at the same time.
- by michael
I want to limit my text view to have maximum of 6 lines, so I did:
<TextView
android:id="@+id/toptext" android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxLines="6"/>
But when I try to configure it to add '...' when the text is truncated, I add android:ellipsize="end". I do see the ... but then my TextView only has a max line of 2, instead of 6.
Can you please how can I make the text view of maximum line of 6 and add '...' when it get truncated?
Thank you.