Concentre - (Fenêtre, Vue) est une destination d'événements de clavier (oui, certains Androïdes ont clavier physique), et certains ont des "déodorant de la balle de la" génération de gauche à droite en bas des flèches des raccourcis clavier.
Activé - le widget (point de vue) qui est activé. E. g. dans la liste de sélection multiple les vues sélectionnées sont activés. Je crois que la nécessité de cette étape supplémentaire dans l'API 11 est due à l'activation de multi-sélection qui contient des cases à cocher. Ainsi, le sélectionné et vérifié les états doivent être séparés.
Choisis - n'est applicable que pour les cases à cocher et d'autres points de vue sélectionnables.
La liste complète des états d'Affichage est (StateSet id sur la gauche, drapeau sur la droite):
R.attr.state_window_focused, VIEW_STATE_WINDOW_FOCUSED,
R.attr.state_selected, VIEW_STATE_SELECTED,
R.attr.state_focused, VIEW_STATE_FOCUSED,
R.attr.state_enabled, VIEW_STATE_ENABLED,
R.attr.state_pressed, VIEW_STATE_PRESSED,
R.attr.state_activated, VIEW_STATE_ACTIVATED,
R.attr.state_accelerated, VIEW_STATE_ACCELERATED,
R.attr.state_hovered, VIEW_STATE_HOVERED,
R.attr.state_drag_can_accept, VIEW_STATE_DRAG_CAN_ACCEPT,
R.attr.state_drag_hovered, VIEW_STATE_DRAG_HOVERED
Voir aussi:
/**
* Changes the activated state of this view. A view can be activated or not.
* Note that activation is not the same as selection. Selection is
* a transient property, representing the view (hierarchy) the user is
* currently interacting with. Activation is a longer-term state that the
* user can move views in and out of. For example, in a list view with
* single or multiple selection enabled, the views in the current selection
* set are activated. (Um, yeah, we are deeply sorry about the terminology
* here.) The activated state is propagated down to children of the view it
* is set on.
*
* @param activated true if the view must be activated, false otherwise
*/
public void setActivated(boolean activated)
/**
* Dispatch a key event to the next view on the focus path. This path runs
* from the top of the view tree down to the currently focused view. If this
* view has focus, it will dispatch to itself. Otherwise it will dispatch
* the next node down the focus path. This method also fires any key
* listeners.
*
* @param event The key event to be dispatched.
* @return True if the event was handled, false otherwise.
*/
public boolean dispatchKeyEvent(KeyEvent event)