Android TextView's subscript being clipped off

前端 未结 9 2401
粉色の甜心
粉色の甜心 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:15

    I have faced the same issue in ICS and below android versions. I fixed the issue by a simple step

    Give a minimum height to the Text View . It will fix the problem.

    You can set minimum height through xml .

            android:minHeight="30dp"
    

    Or dynamically

     if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
    
                tv.setMinHeight(52);
        }
    

提交回复
热议问题