Reputation: 4448
How can I reduce the spacing between the DrawableLeft
and the text in a TextView
I can use setting drawablePadding
to 0 didn't help.
<TextView
android:id="@+id/item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/small_bg"
android:drawableLeft="@drawable/mypic"
android:padding="4dp"
android:text="25"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="20sp" />
Upvotes: 1
Views: 2838
Reputation: 141
set drawablePadding to a negative value
android:drawablePadding="-8dp"
Upvotes: 4
Reputation: 227
You already set the padding for the TextView to 4dp try this:
android:paddingLeft="0dp"
android:paddingRight="4dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
instead of:
android:padding="4dp"
Upvotes: 1