I have a clickable ImageView
with a background color, and what I want is that its background color is changed when it is touched/clicked and it should remain changed even after the click is released, until something else is clicked. For that I am writing a state-list drawable.
I am using the pressed
state, which is while the view is being clicked. I also want to know what state is the ImageView
in after the click is released (until something else is clicked).
I am talking about the following states given here:
- state_pressed
- state_focused
- state_hovered
- state_selected
- state_checkable
- state_checked
- state_enabled
- state_activated
- state_window_focused
This is example !!!