In any case, Hi provides the width and height of the selection in drawable.xml in the drop-down folder.
Example:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/button_pressed" /> <item android:state_focused="true" android:drawable="@drawable/button_focused" /> <item android:drawable="@drawable/button_normal" /> </selector>
I wanted to specify the width and height, perhaps somehow using the scale tag, inside which I tried but did not work. This is my code:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/icon_ratingstar"> <scale android:scaleWidth="20" android:scaleHeight="20" android:drawable="@drawable/icon_ratingstar" /> </item> </selector>
user606669
source share