HumanOidRoBo HumanOidRoBo - 1 year ago 104
Android Question

Putting an image on button in Android

I have created an Android app in which I used two buttons and for those buttons I have designed images to fill the button's width and height properly.

I have saved the image as

that is 1000 x 1000 pixels but when I put the image on button its resolution is messed up.

This is the image for my button

Answer Source

You just use an ImageButton and make the background whatever you want and set the icon as the src.

android:background="@drawable/As_ur_Design" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download