this should be an easy one and I really thought that what I was doing was correct but apparently it isn\'t. I have an image that I want to use as a button, I have the button
Make a use of
Create in your drawable-hdpi folder xml file called button_image.xml
and add the following lines:
and then in your main xml where you declare your button add this line
android:background="@drawable/button_image"
And then you get effect of reall button. Note that you need two pictures to get effect of button being clicked.
If you dont want to use the selector and use just picture instead then just
android:background="@drawable/myimage"