Bret,

You can use a standard ImageButton, and a state-drawable that has a selector for "android:state_selected".

Then use "setSelected(true)" from your code.

No custom component is necessary.

-- Kostya

18.11.2010 20:59, Bret Foreman пишет:
I'm trying to create a small "edit" icon that changes state after an
edit has been made. The icon has a white background when no edit has
been made and changes to a yellow background once the user has made
edits. This let's the user know that the underlying data, which comes
from an online source, is "dirty" and needs to be sync'ed if they want
to save their edits. So I'm really piggy-backing on the "checked"
state and taking it to mean "dirty" in my app.

On Nov 17, 11:38 pm, joebowbeer<[email protected]>  wrote:
Could you achieve the same result extending CompoundButton instead of
ImageView?  If so, it might be easier to do that. Though I'm not at
all sure what you're trying to do.



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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

Reply via email to