Closed qcfer35 closed 9 years ago
+1 Same here. Android 4.4.4.
Found a temporary workaround. Setting android:gravity="fill"
and android:paddingBottom="2dp"
fixed it for me. You may need to add more padding if your text is a larger size.
Or you can set the layout_height
to two dp larger than the font size.
If font-size: 18sp
, then layout_height: 20dp
@fadils this is a good point. but i think he would love to still use wrap_content.
Fixed by v2.
Cut out some words when I use IconTextView, if I use TextView works perfectly
XML
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="5dp" android:layout_marginRight="5dp" android:orientation="horizontal" android:padding="10sp" > <android.widget.IconTextView android:id="@+id/iconTextView1" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout>
tested on Android 4.4.4 Moto G