Uniform text wrapping in TextView

前端 未结 6 1401
隐瞒了意图╮
隐瞒了意图╮ 2021-01-19 06:34

I need nice text wrapping in TextView, especially for text in headers.

Text wrapping for TextView might look like this, where the last word is in new line:



        
6条回答
  •  终归单人心
    2021-01-19 07:29

    Check out Android's own autoTextSizing for TextView, added in add API 26 with Support Library that supports from API 14 onwards with app:autoSizeTextType="uniform".

    Have fun!

    https://developer.android.com/guide/topics/ui/look-and-feel/autosizing-textview.html

提交回复
热议问题