I have need of a button that will change its image from one drawable
to another based on whether it is toggled on (not just when pressed).

I believe to do this I would extend CompoundButton and add images, or
extend ImageButton and implement Checkable, with custom attributes for
onSrc and offSrc.

The current ToggleButton extends TextView and not ImageButton, so you
can't switch images, just text.

I just wanted to make sure I hadn't missed something where this is
already doable with the standard views.

Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to