android: what is the difference between focused, enabled, pressed, and selected states?

android: what is the difference between focused, enabled, pressed, and selected states?


Enabled -> User Interaction possible.

Disabled -> User interaction not possible.

  • if you hover the mouse over a widget, it is focussed
  • If you make a press-down (half click) on that widget, it is pressed
  • If you press-down and press-up while the mouse is at the same position, it is selected
with touch input you need to take care of pressed and selected states. if the touch-down happens inside a widget and touch up happens outside the widget, it is not considered to be selected.

Focus in Android refers to a mode that's only used for dpad/trackball selection.

你可能感兴趣的:(android: what is the difference between focused, enabled, pressed, and selected states?)