Android: How to Make A Drawable Selector -
i feel kind of silly question, here go anyways. have image button, , want able change it's image everytime clicked. api seems best way go doing create xml resource in drawable folder contains selector , values. when go make new android xml resource, there's no option drawables. missing?
as far know, android xml editor doesn't allow create xml drawables. have go source tab (labeled: filename.xml) , paste in text manually. should like:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:drawable="@drawable/cell_top_selected" /> <item android:drawable="@drawable/cell_top" /> </selector>
Comments
Post a Comment