Ruby prO Ruby prO - 1 year ago 67
Android Question

Assigning an image to a 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

With width and height 1000 x 1000 pixels respectively but when I applied those images to a button its resolution is pretty messed up. Following is the image I designed 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