From 75eaae7060d68ec477eb3b78572a4b6e1e9771fa Mon Sep 17 00:00:00 2001 From: Scott Main Date: Fri, 11 Nov 2011 10:44:43 -0800 Subject: [PATCH] Docs: update state list drawable with state_activated and revise selected/focused Change-Id: I6bd919fc71a74fc8135ed333c93d187e0d9e9d80 --- .../topics/resources/drawable-resource.jd | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/html/guide/topics/resources/drawable-resource.jd b/docs/html/guide/topics/resources/drawable-resource.jd index ed9f99056bf5a..5218c7e5362c9 100644 --- a/docs/html/guide/topics/resources/drawable-resource.jd +++ b/docs/html/guide/topics/resources/drawable-resource.jd @@ -646,6 +646,7 @@ In XML: @[package:]drawable/filename android:state_checkable=["true" | "false"] android:state_checked=["true" | "false"] android:state_enabled=["true" | "false"] + android:state_activated=["true" | "false"] android:state_window_focused=["true" | "false"] /> </selector> @@ -690,8 +691,8 @@ child of a <selector> element.
Boolean. "true" if this item should be used when the object is pressed (such as when a button is touched/clicked); "false" if this item should be used in the default, non-pressed state.
android:state_focused
-
Boolean. "true" if this item should be used when the object is focused (such as when a button -is highlighted using the trackball/d-pad); "false" if this item should be used in the default, +
Boolean. "true" if this item should be used when the object has input focus +(such as when the user selects a text input); "false" if this item should be used in the default, non-focused state.
android:state_hovered
Boolean. "true" if this item should be used when the object is being hovered @@ -699,8 +700,11 @@ by a cursor; "false" if this item should be used in the default, non-hovered sta drawable may be the same drawable used for the "focused" state.

Introduced in API level 14.

android:state_selected
-
Boolean. "true" if this item should be used when the object is selected (such as when a -tab is opened); "false" if this item should be used when the object is not selected.
+
Boolean. "true" if this item should be used when the object is the current +user selection when navigating with a directional control (such as when navigating through a list +with a d-pad); "false" if this item should be used when the object is not selected. +

The selected state is used when focus (android:state_focused) is not sufficient +(such as when list view has focus and an item within it is selected with a d-pad).

android:state_checkable
Boolean. "true" if this item should be used when the object is checkable; "false" if this item should be used when the object is not checkable. (Only useful if the object can @@ -709,8 +713,14 @@ transition between a checkable and non-checkable widget.)
Boolean. "true" if this item should be used when the object is checked; "false" if it should be used when the object is un-checked.
android:state_enabled
-
Boolean. "true" if this item should be used when the object is enabled (capable of -receiving touch/click events); "false" if it should be used when the object is disabled.
+
Boolean. "true" if this item should be used when the object is enabled +(capable of receiving touch/click events); "false" if it should be used when the object is +disabled.
+
android:state_activated
+
Boolean. "true" if this item should be used when the object is activated as +the persistent selection (such as to "highlight" the previously selected list item in a persistent +navigation view); "false" if it should be used when the object is not activated. +

Introduced in API level 11.

android:state_window_focused
Boolean. "true" if this item should be used when the application window has focus (the application is in the foreground), "false" if this item should be used when the application