views:

291

answers:

1

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-around for this?

alt text

P/S: Superscripts work fine

Note: padding doesn't work.

  • I tried even adding a padding of 50dip but it did not help.
  • I can use an absolute height such as 50dip but that messes everything up when I need text to wrap around.

Sample Code:

mtTextView.setText(Html.fromHtml("HC0<sub>3</sub>"));

A: 

Try adding some padding (e.g., android:paddingBottom="4dip") to the TextView and see if that helps.

CommonsWare
I tried **android:paddingBottom="50dip"** but it still did not work. The padding was there but the text was still clipped.
Tawani