views:

14

answers:

0

How can I determine what states are possible for a particular view?

I see that the View class defines all the possible states. Does this mean practically that all views can be in all states?

For example, I am working with ListView. When I add the listSelector attribute, my StateListDrawable item "state_focused" works but "state_selected" does not. Where as an element in the row of a ListView is selected but not focused.

Restated, I conclude, a ListView row has a focused state but not a selected state. A layout for a ListView Row has a selected state but not a focused state. This is what I observe in the Hierarchy Viewer and proves out with the state list drawable.

Where can I find which views will have what states by default?