Android TextView's subscript being clipped off

前端 未结 9 2335
粉色の甜心
粉色の甜心 2020-12-28 14:41

The Android TextView clips off my text subscripts (see image below) even when I use android:layout_height=\"wrap_content\" for the TextView. Is there a fix/work

9条回答
  •  有刺的猬
    2020-12-28 15:28

    This worked for me along with the Small tag.

    1. Inside the TextView add

    android:paddingBottom="1dp"

    1. Use the small Tag after the subscript

    yourTextView.setText(Html.fromHtml("" +" Hey< sub >< small >2< /small > < /sub >"));

    Note Please note , step 1 is important , My text was still cutting down in some case,using paddingBottom resolved it. Don't forget to remove the spaces in sub and small tags that are present in my answer :)

提交回复
热议问题