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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -