Android Image Button Styling -
how style image button displays png icon on click/touch, png shape gets soft glowing edge?
you want @ 9-patch
basically create transparent png glow effect baked image, , it'll scale edges while keeping corners intact , letting place content within predefined area of image.
to map images button, need selector, xml file , goes projects drawables. sample grabbed answer looks
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/red_button_pressed" /> <item android:state_focused="true" android:drawable="@drawable/red_button_focus" /> <item android:drawable="@drawable/red_button_rest" /> </selector>
Comments
Post a Comment