Italic TextView with wrap_contents seems to clip the text at right edge

前端 未结 13 1368
孤独总比滥情好
孤独总比滥情好 2020-12-24 10:22


        
13条回答
  •  滥情空心
    2020-12-24 11:14

    android:layout_width="wrap_content" , gives you a rectangle for wrapped content rendering. All will work well for normal text (non-italic).

    Once you have italic text enabled, the wrapped text will try to fit into the rectangle and hence the rightmost character will be cut off unless its un-cut-able (such as ., ), 1, etc.)

    Solution as suggested is to have a space at the end of the text (or anything better ??)

    PS: This applies to android:gravity="right" too because the text will be pushed to the rightmost. If we have italic text, we face the same problem.

提交回复
热议问题