I have a textView as follows:
<TextView
android:id="@+id/pointsTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/pointTextView"
android:ellipsize="start"
android:lines="2"
android:paddingEnd="5dp"
android:paddingStart="5dp"
android:text="this is a very very very very very very very very very very very very very very very very very very very very very long sentence." />
Here ellipsize="end"
is working perfectly, but ellipsize="start"
is not wroking when no of lines is not 1.
How can I make this work in such TextView with 2 or more no of lines?
If you want to use android:ellipsize="start"
with android:maxLines="2"
(more than one), then it's not possible in android (since API level 1).
If setMaxLines(int) has been used to set two or more lines, only END and MARQUEE are supported (other ellipsizing types will not do anything).
See the documentation here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With