In an app I am working on, I have several ImageButtons. Each ImageButton has a background and content in the form of a drawable. Right now the drawable is at maximum size wi
Better use ImageView than ImageButton if you need set image smaller with padding
The padding only has effect on the android:src
attribute, not on the android:background
.
Set the first to your button image and the latter to android:background="@android:color/transparent"
You have to add to Your ImageButton definition
android:scaleType="fitCenter"
or other scaleType like fitXY, because by default image try to scale as much as possible and ignore padding