android - Scaling a drawable inside a button? -


currently drawable scales it's normal size, want fit inside button. here's picture of how looks now:

enter image description here

here xml button:

<linearlayout android:layout_width="wrap_content"     android:id="@+id/linearlayout2" android:layout_height="40dp"     android:layout_weight="0.4" android:gravity="right|center_vertical"     android:paddingright="5dp">     <button android:id="@+id/button1" android:background="@drawable/refresh"         android:layout_height="25dp" android:layout_width="150dp"         android:text="@string/buttonsearchagain" android:drawableright="@drawable/refresh_48"></button> </linearlayout> 

so want this:

enter image description here

is there way can shrink drawable?

recreate image. keep image size in pixels reduce size of arrow , make rest transparent. that's bet anyway =)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -