I have a button on which i put an image
I've been told i need to reduce the size of the image by 30%, so i created a scale drawable and put that in the selector of the button
unfortunately, the image does not display on the button as expected.
here is my code for the button
<Button
android:id="@+id/btnMain"
style="@style/buttonMenuAppearance"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableTop="@drawable/selector_ic_main"
android:text="@string/btnMain" />
my selector
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/scaled_ic_main_disabled" android:state_enabled="false"></item>
<item android:drawable="@drawable/ic_main_pressed" android:state_enabled="true" android:state_pressed="true"></item>
<item android:drawable="@drawable/ic_main_normal" android:state_enabled="true" android:state_pressed="false"></item>
<item android:drawable="@drawable/ic_main_normal"></item>
</selector>
my scaled drawable
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_main_disabled"
android:scaleGravity="center_vertical|center_horizontal"
android:scaleHeight="30%"
android:scaleWidth="30%" />
the way it looked before the scale :
the way it looks after the scale :
why isnt my image showing up ?