I am writing text description in two lines using TextView. I am using android:gravity="center"
to centrally aligned two lines & also used android:maxLines="2"
& android:ellipsize="end"
attributes in xml file. First line is coming properly but at left side of second line text is getting clipped. If I remove android:ellipsize="end"
attribute then there is no any text cut. So i am thinking that my problem is because of ellipsize attribute. I tried a lot of experiments to solve this issue, but not succeeded. Can anybody help me to solve my issue.
Asked
Active
Viewed 846 times
4

NullPointerException
- 3,978
- 4
- 34
- 52

Tiger
- 559
- 6
- 14
1 Answers
12
Apparently, there is an incompatibility between the attributes ellipsize, maxLines and letterSpacing.
I had exactly the same issue, and setting the next line solved the issue.
android:letterSpacing="0"
Hope this helps :)

franzesz
- 146
- 1
- 7
-
1Amazing... You're life savior – ievgen Jun 09 '21 at 06:53