Reputation: 51
How would I modify the .xml and .java files so that a RadioButton shows one image when selected and another image when not selected?
Example for RadioButton I am learning from: http://www.androidpeople.com/android-radiobutton-example/
Upvotes: 1
Views: 5321
Reputation: 15267
you need to set its android:button
property to a StateListDrawable that has at least two states: selected=true and a default one (unselected).
Upvotes: 1
Reputation: 4361
Here is an example that uses StateListDrawable and RadioButtons, and seems to do what you want.
Upvotes: 3