Merge "Docs: update state list drawable with state_activated and revise selected/focused" into ics-mr0

This commit is contained in:
Scott Main
2011-11-11 17:17:23 -08:00
committed by Android (Google) Code Review

View File

@@ -646,6 +646,7 @@ In XML: <code>@[<em>package</em>:]drawable/<em>filename</em></code>
android:state_checkable=["true" | "false"] android:state_checkable=["true" | "false"]
android:state_checked=["true" | "false"] android:state_checked=["true" | "false"]
android:state_enabled=["true" | "false"] android:state_enabled=["true" | "false"]
android:state_activated=["true" | "false"]
android:state_window_focused=["true" | "false"] /> android:state_window_focused=["true" | "false"] />
&lt;/selector> &lt;/selector>
</pre> </pre>
@@ -690,8 +691,8 @@ child of a <code>&lt;selector&gt;</code> element.
<dd><em>Boolean</em>. "true" if this item should be used when the object is pressed (such as when a button <dd><em>Boolean</em>. "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.</dd> is touched/clicked); "false" if this item should be used in the default, non-pressed state.</dd>
<dt><code>android:state_focused</code></dt> <dt><code>android:state_focused</code></dt>
<dd><em>Boolean</em>. "true" if this item should be used when the object is focused (such as when a button <dd><em>Boolean</em>. "true" if this item should be used when the object has input focus
is highlighted using the trackball/d-pad); "false" if this item should be used in the default, (such as when the user selects a text input); "false" if this item should be used in the default,
non-focused state.</dd> non-focused state.</dd>
<dt><code>android:state_hovered</code></dt> <dt><code>android:state_hovered</code></dt>
<dd><em>Boolean</em>. "true" if this item should be used when the object is being hovered <dd><em>Boolean</em>. "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. drawable may be the same drawable used for the "focused" state.
<p>Introduced in API level 14.</p></dd> <p>Introduced in API level 14.</p></dd>
<dt><code>android:state_selected</code></dt> <dt><code>android:state_selected</code></dt>
<dd><em>Boolean</em>. "true" if this item should be used when the object is selected (such as when a <dd><em>Boolean</em>. "true" if this item should be used when the object is the current
tab is opened); "false" if this item should be used when the object is not selected.</dd> 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.
<p>The selected state is used when focus (<code>android:state_focused</code>) is not sufficient
(such as when list view has focus and an item within it is selected with a d-pad).</p></dd>
<dt><code>android:state_checkable</code></dt> <dt><code>android:state_checkable</code></dt>
<dd><em>Boolean</em>. "true" if this item should be used when the object is checkable; "false" if this <dd><em>Boolean</em>. "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 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.)</dd>
<dd><em>Boolean</em>. "true" if this item should be used when the object is checked; "false" if it <dd><em>Boolean</em>. "true" if this item should be used when the object is checked; "false" if it
should be used when the object is un-checked.</dd> should be used when the object is un-checked.</dd>
<dt><code>android:state_enabled</code></dt> <dt><code>android:state_enabled</code></dt>
<dd><em>Boolean</em>. "true" if this item should be used when the object is enabled (capable of <dd><em>Boolean</em>. "true" if this item should be used when the object is enabled
receiving touch/click events); "false" if it should be used when the object is disabled.</dd> (capable of receiving touch/click events); "false" if it should be used when the object is
disabled.</dd>
<dt><code>android:state_activated</code></dt>
<dd><em>Boolean</em>. "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.
<p>Introduced in API level 11.</p></dd>
<dt><code>android:state_window_focused</code></dt> <dt><code>android:state_window_focused</code></dt>
<dd><em>Boolean</em>. "true" if this item should be used when the application window has focus (the <dd><em>Boolean</em>. "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 application is in the foreground), "false" if this item should be used when the application