How can I show ellipses on my TextView if it is greater than the 1 line?

后端 未结 7 1218
终归单人心
终归单人心 2020-11-30 22:19

I have the following Layout which does not work:



        
相关标签:
7条回答
  • 2020-11-30 22:59

    android:singleLine is deprecated. In my case, I had to get a fixed height for the TextView and I used the android:lines attribute instead of android:maxLines. I thought this might help someone having the same problem as mine.

    android:ellipsize="end"
    android:lines="2"
    
    0 讨论(0)
提交回复
热议问题