End TextView with 3 dots with use of maxLength

前端 未结 11 888
北海茫月
北海茫月 2020-12-13 06:08

I have a TextView in my layout which is wrap_content in layout_width. It is limited to maximum of 15 characters so I\'m using maxLength.

I need to end this TextView

11条回答
  •  爱一瞬间的悲伤
    2020-12-13 06:09

    Very Important: ellipsize = "end" only works when maxLength is set to a value that is more than the number of characters on one line. You can use wrap_content if you align the TextView's end and start to any other view(s).

提交回复
热议问题