OSDN Git Service

update action bar guide for support lib ABC
authorScott Main <smain@google.com>
Wed, 19 Jun 2013 04:16:25 +0000 (21:16 -0700)
committerScott Main <smain@google.com>
Tue, 23 Jul 2013 19:17:05 +0000 (12:17 -0700)
Change-Id: Ie4594b3a0e0a686ed37d858788c7c747a1ee09e0

25 files changed:
docs/html/design/building-blocks/tabs.jd
docs/html/design/media/tabs_youtube.png
docs/html/design/patterns/actionbar.jd
docs/html/design/patterns/navigation.jd
docs/html/guide/topics/manifest/activity-element.jd
docs/html/guide/topics/ui/actionbar.jd
docs/html/images/practices/actionbar-phone-splitaction.png
docs/html/images/practices/actionbar-phone-splitaction@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-dropdown.png [new file with mode: 0644]
docs/html/images/ui/actionbar-dropdown@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-item-withtext.png
docs/html/images/ui/actionbar-searchview.png
docs/html/images/ui/actionbar-searchview@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-shareaction.png
docs/html/images/ui/actionbar-shareaction@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-splitaction.png [new file with mode: 0644]
docs/html/images/ui/actionbar-splitaction@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-stacked.png [deleted file]
docs/html/images/ui/actionbar-tabs-stacked.png [new file with mode: 0644]
docs/html/images/ui/actionbar-tabs-stacked@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-tabs.png
docs/html/images/ui/actionbar-tabs@2x.png [new file with mode: 0644]
docs/html/images/ui/actionbar-up.png [new file with mode: 0644]
docs/html/images/ui/actionbar.png
docs/html/images/ui/actionbar@2x.png [new file with mode: 0644]

index 4778400..2bc90ab 100644 (file)
@@ -53,7 +53,7 @@ to the next/previous view, swipe left or right.</p>
 
 <img src="{@docRoot}design/media/tabs_youtube.png">
 <div class="figure-caption">
-  Tabs in the YouTube app.
+  Tabs in the Google Play Movies app.
 </div>
 
 
index 4ea6c1c..a4c1ae5 100644 (file)
Binary files a/docs/html/design/media/tabs_youtube.png and b/docs/html/design/media/tabs_youtube.png differ
index 6020034..ceb5a4c 100644 (file)
@@ -123,7 +123,7 @@ the top bar.</p>
   </div>
 </div>
 
-<h2>Action Buttons</h2>
+<h2 id="ActionButtons">Action Buttons</h2>
 <p><em>Action buttons</em> on the action bar surface your app's most important activities. Think about which
 buttons will get used most often, and order them accordingly. Depending on available screen real
 estate, the system shows your most important actions as action buttons and moves the rest to the
index 4da87b9..6f2215a 100644 (file)
@@ -1,5 +1,5 @@
 page.title=Navigation with Back and Up
-page.tags="navigation","activity","task"
+page.tags="navigation","activity","task","up navigation","back navigation"
 @jd:body
 
 <a class="notice-developers" href="{@docRoot}training/implementing-navigation/index.html">
index adc795d..8df1fdf 100644 (file)
@@ -54,85 +54,85 @@ parent.link=manifest-intro.html
 <br/><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html">&lt;meta-data&gt;</a></code></dd>
 
 <dt>description:</dt>
-<dd>Declares an activity (an {@link android.app.Activity} subclass) that 
-implements part of the application's visual user interface.  All activities 
-must be represented by {@code &lt;activity&gt;} 
-elements in the manifest file.  Any that are not declared there will not be seen 
+<dd>Declares an activity (an {@link android.app.Activity} subclass) that
+implements part of the application's visual user interface.  All activities
+must be represented by {@code &lt;activity&gt;}
+elements in the manifest file.  Any that are not declared there will not be seen
 by the system and will never be run.
 
 <dt>attributes:</dt>
 <dd><dl class="attr">
 <dt><a name="reparent"></a>{@code android:allowTaskReparenting}</dt>
-<dd>Whether or not the activity can move from the task that started it to 
-the task it has an affinity for when that task is next brought to the 
-front &mdash; "{@code true}" if it can move, and "{@code false}" if it 
-must remain with the task where it started.  
+<dd>Whether or not the activity can move from the task that started it to
+the task it has an affinity for when that task is next brought to the
+front &mdash; "{@code true}" if it can move, and "{@code false}" if it
+must remain with the task where it started.
 
 <p>
-If this attribute is not set, the value set by the corresponding 
+If this attribute is not set, the value set by the corresponding
 <code><a href="{@docRoot}guide/topics/manifest/application-element.html#reparent">allowTaskReparenting</a></code>
-attribute of the <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element 
+attribute of the <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element
 applies to the activity.  The default value is "{@code false}".
 </p>
 
 <p>
-Normally when an activity is started, it's associated with the task of 
-the activity that started it and it stays there for its entire lifetime.  
-You can use this attribute to force it to be re-parented to the task it 
-has an affinity for when its current task is no longer displayed.  
-Typically, it's used to cause the activities of an application to move 
+Normally when an activity is started, it's associated with the task of
+the activity that started it and it stays there for its entire lifetime.
+You can use this attribute to force it to be re-parented to the task it
+has an affinity for when its current task is no longer displayed.
+Typically, it's used to cause the activities of an application to move
 to the main task associated with that application.
 </p>
 
 <p>
-For example, if an e-mail message contains a link to a web page, clicking 
-the link brings up an activity that can display the page.  That activity 
-is defined by the browser application, but is launched as part of the e-mail 
-task.  If it's reparented to the browser task, it will be shown when the 
-browser next comes to the front, and will be absent when the e-mail task 
+For example, if an e-mail message contains a link to a web page, clicking
+the link brings up an activity that can display the page.  That activity
+is defined by the browser application, but is launched as part of the e-mail
+task.  If it's reparented to the browser task, it will be shown when the
+browser next comes to the front, and will be absent when the e-mail task
 again comes forward.
 </p>
 
 <p>
-The affinity of an activity is defined by the 
-<code><a href="#aff">taskAffinity</a></code> attribute.  The affinity 
+The affinity of an activity is defined by the
+<code><a href="#aff">taskAffinity</a></code> attribute.  The affinity
 of a task is determined by reading the affinity of its root activity.
 Therefore, by definition, a root activity is always in a task with the
-same affinity.  Since activities with "{@code singleTask}" or 
+same affinity.  Since activities with "{@code singleTask}" or
 "{@code singleInstance}" launch modes can only be at the root of a task,
-re-parenting is limited to the "{@code standard}" and "{@code singleTop}" 
-modes.  (See also the <code><a href="#lmode">launchMode</a></code> 
+re-parenting is limited to the "{@code standard}" and "{@code singleTop}"
+modes.  (See also the <code><a href="#lmode">launchMode</a></code>
 attribute.)
 </p></dd>
 
 <dt><a name="always"></a>{@code android:alwaysRetainTaskState}</dt>
-<dd>Whether or not the state of the task that the activity is in will always 
-be maintained by the system &mdash; "{@code true}" if it will be, and 
-"{@code false}" if the system is allowed to reset the task to its initial 
-state in certain situations.  The default value is "{@code false}".  This 
-attribute is meaningful only for the root activity of a task; it's ignored 
+<dd>Whether or not the state of the task that the activity is in will always
+be maintained by the system &mdash; "{@code true}" if it will be, and
+"{@code false}" if the system is allowed to reset the task to its initial
+state in certain situations.  The default value is "{@code false}".  This
+attribute is meaningful only for the root activity of a task; it's ignored
 for all other activities.
 
 <p>
-Normally, the system clears a task (removes all activities from the stack 
-above the root activity) in certain situations when the user re-selects that 
-task from the home screen.  Typically, this is done if the user hasn't visited 
+Normally, the system clears a task (removes all activities from the stack
+above the root activity) in certain situations when the user re-selects that
+task from the home screen.  Typically, this is done if the user hasn't visited
 the task for a certain amount of time, such as 30 minutes.
 </p>
 
 <p>
-However, when this attribute is "{@code true}", users will always return 
-to the task in its last state, regardless of how they get there.  This is 
-useful, for example, in an application like the web browser where there is 
+However, when this attribute is "{@code true}", users will always return
+to the task in its last state, regardless of how they get there.  This is
+useful, for example, in an application like the web browser where there is
 a lot of state (such as multiple open tabs) that users would not like to lose.
 </p></dd>
 
 <dt><a name="clear"></a>{@code android:clearTaskOnLaunch}</dt>
-<dd>Whether or not all activities will be removed from the task, except for 
-the root activity, whenever it is re-launched from the home screen &mdash; 
-"{@code true}" if the task is always stripped down to its root activity, and 
-"{@code false}" if not.  The default value is "{@code false}".  This attribute 
-is meaningful only for activities that start a new task (the root activity); 
+<dd>Whether or not all activities will be removed from the task, except for
+the root activity, whenever it is re-launched from the home screen &mdash;
+"{@code true}" if the task is always stripped down to its root activity, and
+"{@code false}" if not.  The default value is "{@code false}".  This attribute
+is meaningful only for activities that start a new task (the root activity);
 it's ignored for all other activities in the task.
 
 <p>
@@ -140,24 +140,24 @@ When the value is "{@code true}", every time users start the task again, they
 are brought to its root activity regardless of what they were last doing in
 the task and regardless of whether they used the <em>Back</em> or <em>Home</em> button to
 leave it. When the value is "{@code false}", the task may be cleared of activities in
-some situations (see the 
-<code><a href="#always">alwaysRetainTaskState</a></code> attribute), but not always.  
+some situations (see the
+<code><a href="#always">alwaysRetainTaskState</a></code> attribute), but not always.
 </p>
 
 <p>
-Suppose, for example, that someone launches activity P from the home screen, 
-and from there goes to activity Q.  The user next presses <em>Home</em>, and then returns 
-to activity P.  Normally, the user would see activity Q, since that is what they 
-were last doing in P's task.  However, if P set this flag to "{@code true}", all 
-of the activities on top of it (Q in this case) were removed when the user pressed 
-<em>Home</em> and the task went to the background.  So the user sees only P when returning 
+Suppose, for example, that someone launches activity P from the home screen,
+and from there goes to activity Q.  The user next presses <em>Home</em>, and then returns
+to activity P.  Normally, the user would see activity Q, since that is what they
+were last doing in P's task.  However, if P set this flag to "{@code true}", all
+of the activities on top of it (Q in this case) were removed when the user pressed
+<em>Home</em> and the task went to the background.  So the user sees only P when returning
 to the task.
 </p>
 
 <p>
-If this attribute and <code><a href="#reparent">allowTaskReparenting</a></code> 
-are both "{@code true}", any activities that can be re-parented are moved to 
-the task they share an affinity with; the remaining activities are then dropped, 
+If this attribute and <code><a href="#reparent">allowTaskReparenting</a></code>
+are both "{@code true}", any activities that can be re-parented are moved to
+the task they share an affinity with; the remaining activities are then dropped,
 as described above.
 </p></dd>
 
@@ -169,7 +169,7 @@ activity remains running and its <code>{@link android.app.Activity#onConfigurati
 onConfigurationChanged()}</code> method is called.
 
 <p class="note"><strong>Note:</strong> Using this attribute should be
-avoided and used only as a last-resort. Please read <a
+avoided and used only as a last resort. Please read <a
 href="{@docRoot}guide/topics/resources/runtime-changes.html">Handling Runtime Changes</a> for more
 information about how to properly handle a restart due to a configuration change.</p>
 
@@ -220,11 +220,11 @@ separated by '{@code |}' &mdash; for example, "{@code locale|navigation|orientat
   <td>"{@code uiMode}"</td>
    <td>The user interface mode has changed &mdash; this can be caused when the user places the
 device into a desk/car dock or when the night mode changes. See {@link
-android.app.UiModeManager}. 
+android.app.UiModeManager}.
     <em>Added in API level 8</em>.</td>
   </tr><tr>
    <td>"{@code orientation}"</td>
-   <td>The screen orientation has changed &mdash; the user has rotated the device. 
+   <td>The screen orientation has changed &mdash; the user has rotated the device.
        <p class="note"><strong>Note:</strong> If your application targets API level 13 or higher (as
 declared by the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
 minSdkVersion}</a> and <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
@@ -258,70 +258,70 @@ restart your activity, even when running on an Android 3.2 or higher device).
 </table>
 
 <p>
-All of these configuration changes can impact the resource values seen by the 
-application.  Therefore, when <code>{@link android.app.Activity#onConfigurationChanged 
-onConfigurationChanged()}</code> is called, it will generally be necessary to again 
-retrieve all resources (including view layouts, drawables, and so on) to correctly 
-handle the change. 
+All of these configuration changes can impact the resource values seen by the
+application.  Therefore, when <code>{@link android.app.Activity#onConfigurationChanged
+onConfigurationChanged()}</code> is called, it will generally be necessary to again
+retrieve all resources (including view layouts, drawables, and so on) to correctly
+handle the change.
 </p></dd>
 
 <dt><a name="enabled"></a>{@code android:enabled}</dt>
-<dd>Whether or not the activity can be instantiated by the system &mdash; 
-"{@code true}" if it can be, and "{@code false}" if not.  The default value 
+<dd>Whether or not the activity can be instantiated by the system &mdash;
+"{@code true}" if it can be, and "{@code false}" if not.  The default value
 is "{@code true}".
 
 <p>
-The <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element has its own 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code> 
-attribute that applies to all application components, including activities.  The 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
-and {@code &lt;activity&gt;} attributes must both be "{@code true}" (as they both 
-are by default) for the system to be able to instantiate the activity.  If either 
+The <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element has its own
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html#enabled">enabled</a></code>
+attribute that applies to all application components, including activities.  The
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+and {@code &lt;activity&gt;} attributes must both be "{@code true}" (as they both
+are by default) for the system to be able to instantiate the activity.  If either
 is "{@code false}", it cannot be instantiated.
 </p></dd>
 
 <dt><a name="exclude"></a>{@code android:excludeFromRecents}</dt>
 <dd>Whether or not the task initiated by this activity should be excluded from the list of recently
 used applications ("recent apps"). That is, when this activity is the root activity of a new task,
-this attribute determines whether the task should not appear in the list of recent apps. "{@code
-true}" if the task should be <em>excluded</em> from the list; "{@code false}" if it should be
+this attribute determines whether the task should not appear in the list of recent apps. Set "{@code
+true}" if the task should be <em>excluded</em> from the list; set "{@code false}" if it should be
 <em>included</em>. The default value is "{@code false}".
 </p></dd>
 
 <dt><a name="exported"></a>{@code android:exported}</dt>
-<dd>Whether or not the activity can be launched by components of other 
-applications &mdash; "{@code true}" if it can be, and "{@code false}" if not.  
-If "{@code false}", the activity can be launched only by components of the 
-same application or applications with the same user ID.  
+<dd>Whether or not the activity can be launched by components of other
+applications &mdash; "{@code true}" if it can be, and "{@code false}" if not.
+If "{@code false}", the activity can be launched only by components of the
+same application or applications with the same user ID.
 
 <p>
-The default value depends on whether the activity contains intent filters.  The 
-absence of any filters means that the activity can be invoked only by specifying 
-its exact class name.  This implies that the activity is intended only for 
-application-internal use (since others would not know the class name).  So in 
+The default value depends on whether the activity contains intent filters.  The
+absence of any filters means that the activity can be invoked only by specifying
+its exact class name.  This implies that the activity is intended only for
+application-internal use (since others would not know the class name).  So in
 this case, the default value is "{@code false}".
-On the other hand, the presence of at least one filter implies that the activity 
+On the other hand, the presence of at least one filter implies that the activity
 is intended for external use, so the default value is "{@code true}".
 </p>
 
 <p>
 This attribute is not the only way to limit an activity's exposure to other
-applications.  You can also use a permission to limit the external entities that 
-can invoke the activity  (see the 
-<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#prmsn">permission</a></code> 
+applications.  You can also use a permission to limit the external entities that
+can invoke the activity  (see the
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#prmsn">permission</a></code>
 attribute).
 </p></dd>
 
 <dt><a name="finish"></a>{@code android:finishOnTaskLaunch}</dt>
-<dd>Whether or not an existing instance of the activity should be shut down 
-(finished) whenever the user again launches its task (chooses the task on the 
-home screen) &mdash; "{@code true}" if it should be shut down, and "{@code false}" 
+<dd>Whether or not an existing instance of the activity should be shut down
+(finished) whenever the user again launches its task (chooses the task on the
+home screen) &mdash; "{@code true}" if it should be shut down, and "{@code false}"
 if not. The default value is "{@code false}".
 
 <p>
-If this attribute and 
-<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">allowTaskReparenting</a></code> 
-are both "{@code true}", this attribute trumps the other.  The affinity of the 
+If this attribute and
+<code><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">allowTaskReparenting</a></code>
+are both "{@code true}", this attribute trumps the other.  The affinity of the
 activity is ignored.  The activity is not re-parented, but destroyed.
 </p>
 
@@ -346,58 +346,58 @@ make use of the renderer without errors.</p>
 </dd>
 
 <dt><a name="icon"></a>{@code android:icon}</dt>
-<dd>An icon representing the activity. The icon is displayed to users when 
-a representation of the activity is required on-screen.  For example, icons 
-for activities that initiate tasks are displayed in the launcher window.  
+<dd>An icon representing the activity. The icon is displayed to users when
+a representation of the activity is required on-screen.  For example, icons
+for activities that initiate tasks are displayed in the launcher window.
 The icon is often accompanied by a label (see the <a href="#label">{@code
 android:label}</a> attribute).
 </p>
 
 <p>
-This attribute must be set as a reference to a drawable resource containing 
-the image definition.  If it is not set, the icon specified for the application 
-as a whole is used instead (see the 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
+This attribute must be set as a reference to a drawable resource containing
+the image definition.  If it is not set, the icon specified for the application
+as a whole is used instead (see the
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
 element's <code><a href="{@docRoot}guide/topics/manifest/application-element.html#icon">icon</a></code> attribute).
 </p>
 
 <p>
-The activity's icon &mdash; whether set here or by the 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
-element &mdash; is also the default icon for all the activity's intent filters (see the 
-<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></code> element's 
-<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html#icon">icon</a></code> attribute). 
+The activity's icon &mdash; whether set here or by the
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+element &mdash; is also the default icon for all the activity's intent filters (see the
+<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></code> element's
+<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html#icon">icon</a></code> attribute).
 </p></dd>
 
 <dt><a name="label"></a>{@code android:label}</dt>
-<dd>A user-readable label for the activity.  The label is displayed on-screen 
-when the activity must be represented to the user. It's often displayed along 
+<dd>A user-readable label for the activity.  The label is displayed on-screen
+when the activity must be represented to the user. It's often displayed along
 with the activity icon.
 
 <p>
-If this attribute is not set, the label set for the application as a whole is 
-used instead (see the <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element's 
+If this attribute is not set, the label set for the application as a whole is
+used instead (see the <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element's
 <code><a href="{@docRoot}guide/topics/manifest/application-element.html#label">label</a></code> attribute).
 </p>
 
 <p>
-The activity's label &mdash; whether set here or by the 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element &mdash; is also the 
-default label for all the activity's intent filters (see the 
-<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></code> element's 
-<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html#label">label</a></code> attribute). 
+The activity's label &mdash; whether set here or by the
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element &mdash; is also the
+default label for all the activity's intent filters (see the
+<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">&lt;intent-filter&gt;</a></code> element's
+<code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html#label">label</a></code> attribute).
 </p>
 
 <p>
 The label should be set as a reference to a string resource, so that
-it can be localized like other strings in the user interface.  
-However, as a convenience while you're developing the application, 
+it can be localized like other strings in the user interface.
+However, as a convenience while you're developing the application,
 it can also be set as a raw string.
 </p></dd>
 
 <dt><a name="lmode"></a>{@code android:launchMode}</dt>
 <dd>An instruction on how the activity should be launched.  There are four modes
-that work in conjunction with activity flags ({@code FLAG_ACTIVITY_*} constants) 
+that work in conjunction with activity flags ({@code FLAG_ACTIVITY_*} constants)
 in {@link android.content.Intent} objects to determine what should happen when
 the activity is called upon to handle an intent. They are:</p>
 
@@ -417,7 +417,7 @@ As shown in the table below, the modes fall into two main groups, with
 An activity with the "{@code standard}" or "{@code singleTop}" launch mode
 can be instantiated multiple times.  The instances can belong to any task
 and can be located anywhere in the activity stack.  Typically, they're
-launched into the task that called 
+launched into the task that called
 <code>{@link android.content.Context#startActivity startActivity()}</code>
 (unless the Intent object contains a
 <code>{@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK}</code>
@@ -433,7 +433,7 @@ Moreover, the device can hold only one instance of the activity at a time
 </p>
 
 <p>
-The "{@code standard}" and "{@code singleTop}" modes differ from each other 
+The "{@code standard}" and "{@code singleTop}" modes differ from each other
 in just one respect:  Every time there's a new intent for a "{@code standard}"
 activity, a new instance of the class is created to respond to that intent.
 Each instance handles a single intent.
@@ -509,41 +509,41 @@ common and useful launch mode for many types of activities. The other modes
 &mdash; <code>singleTask</code> and <code>singleInstance</code> &mdash; are
 <span style="color:red">not appropriate for most applications</span>,
 since they result in an interaction model that is likely to be unfamiliar to
-users and is very different from most other applications. 
+users and is very different from most other applications.
 
 <p>Regardless of the launch mode that you choose, make sure to test the usability
 of the activity during launch and when navigating back to it from
 other activities and tasks using the <em>Back</em> button. </p>
 
 <p>For more information on launch modes and their interaction with Intent
-flags, see the 
+flags, see the
 <a href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>
 document.
 </p>
 </dd>
 
 <dt><a name="multi"></a>{@code android:multiprocess}</dt>
-<dd>Whether an instance of the activity can be launched into the process of the component 
-that started it &mdash; "{@code true}" if it can be, and "{@code false}" if not.  
+<dd>Whether an instance of the activity can be launched into the process of the component
+that started it &mdash; "{@code true}" if it can be, and "{@code false}" if not.
 The default value is "{@code false}".
 
 <p>
-Normally, a new instance of an activity is launched into the process of the 
-application that defined it, so all instances of the activity run in the same 
-process.  However, if this flag is set to "{@code true}", instances of the 
-activity can run in multiple processes, allowing the system to create instances 
-wherever they are used (provided permissions allow it), something that is almost 
+Normally, a new instance of an activity is launched into the process of the
+application that defined it, so all instances of the activity run in the same
+process.  However, if this flag is set to "{@code true}", instances of the
+activity can run in multiple processes, allowing the system to create instances
+wherever they are used (provided permissions allow it), something that is almost
 never necessary or desirable.
 </p></dd>
 
 <dt><a name="nm"></a>{@code android:name}</dt>
-<dd>The name of the class that implements the activity, a subclass of 
-{@link android.app.Activity}.  The attribute value should be a fully qualified 
-class name (such as, "{@code com.example.project.ExtracurricularActivity}").  
-However, as a shorthand, if the first character of the name is a period 
-(for example, "{@code .ExtracurricularActivity}"), it is appended to the 
-package name specified in the 
-<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code> 
+<dd>The name of the class that implements the activity, a subclass of
+{@link android.app.Activity}.  The attribute value should be a fully qualified
+class name (such as, "{@code com.example.project.ExtracurricularActivity}").
+However, as a shorthand, if the first character of the name is a period
+(for example, "{@code .ExtracurricularActivity}"), it is appended to the
+package name specified in the
+<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
 element.
 <p>Once you publish your application, you <a
 href="http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html">should not
@@ -557,9 +557,9 @@ There is no default.  The name must be specified.
 <!-- ##api level 3## -->
 <dt><a name="nohist"></a>{@code android:noHistory}</dt>
 <dd>Whether or not the activity should be removed from the activity stack and
-finished (its <code>{@link android.app.Activity#finish finish()}</code> 
-method called) when the user navigates away from it and it's no longer 
-visible on screen &mdash; "{@code true}" if it should be finished, and 
+finished (its <code>{@link android.app.Activity#finish finish()}</code>
+method called) when the user navigates away from it and it's no longer
+visible on screen &mdash; "{@code true}" if it should be finished, and
 "{@code false}" if not.  The default value is "{@code false}".
 
 <p>
@@ -575,14 +575,33 @@ This attribute was introduced in API Level 3.
 
 <!-- api level 16 -->
 <dt><a name="parent"></a>{@code android:parentActivityName}</dt>
-<dd>The class name of the logical parent of the activity. The name here must be formatted
-  the same as the corresponding activity is declared in its own
-  <a href="#nm">android:name</a>.
-  
+<dd>The class name of the logical parent of the activity. The name here must match the class
+  name given to the corresponding {@code &lt;activity>} element's
+  <a href="#nm"><code>android:name</code></a> attribute.
+
 <p>The system reads this attribute to determine which activity should be started when
   the use presses the Up button in the action bar. The system can also use this information to
   synthesize a back stack of activities with {@link android.app.TaskStackBuilder}.</p>
 
+<p>To support API levels 4 - 16, you can also declare the parent activity with a {@code
+&lt;meta-data>} element that specifies a value for {@code "android.support.PARENT_ACTIVITY"}.
+For example:</p>
+<pre>
+&lt;activity
+    android:name="com.example.app.ChildActivity"
+    android:label="@string/title_child_activity"
+    android:parentActivityName="com.example.myfirstapp.MainActivity" >
+    &lt;!-- Parent activity meta-data to support API level 4+ -->
+    &lt;meta-data
+        android:name="android.support.PARENT_ACTIVITY"
+        android:value="com.example.app.MainActivity" />
+&lt;/activity>
+</pre>
+
+<p>For more information about declaring the parent activity to support Up navigation,
+read <a href="{@docRoot}training/implementing-navigation/ancestral.html">Providing Up
+Navigation</a>.</p>
+
 <p>
 This attribute was introduced in API Level 16.
 </p>
@@ -591,63 +610,67 @@ This attribute was introduced in API Level 16.
 
 
 <dt><a name="prmsn"></a>{@code android:permission}</dt>
-<dd>The name of a permission that clients must have to launch the activity 
-or otherwise get it to respond to an intent.  If a caller of 
+<dd>The name of a permission that clients must have to launch the activity
+or otherwise get it to respond to an intent.  If a caller of
 <code>{@link android.content.Context#startActivity startActivity()}</code> or
 <code>{@link android.app.Activity#startActivityForResult startActivityForResult()}</code>
-has not been granted the specified permission, its intent will not be 
+has not been granted the specified permission, its intent will not be
 delivered to the activity.
 
 <p>
-If this attribute is not set, the permission set by the 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
+If this attribute is not set, the permission set by the
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
 element's
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html#prmsn">permission</a></code> 
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html#prmsn">permission</a></code>
 attribute applies to the activity.  If neither attribute is set, the activity is
 not protected by a permission.
 </p>
 
 <p>
-For more information on permissions, see the 
-<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#sectperm">Permissions</a> 
-section in the introduction and another document, 
+For more information on permissions, see the
+<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#sectperm">Permissions</a>
+section in the introduction and another document,
 <a href="{@docRoot}guide/topics/security/security.html">Security and
 Permissions</a>.
 </p></dd>
 
 <dt><a name="proc"></a>{@code android:process}</dt>
-<dd>The name of the process in which the activity should run. Normally, 
-all components of an application run in the default process created for the 
-application.  It has the same name as the application package. The <code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> element's 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html#proc">process</a></code> 
-attribute can set a different default for all components.  But each component 
-can override the default, allowing you to spread your application across 
+<dd>The name of the process in which the activity should run. Normally, all components of an
+application run in a default process name created for the application and you do
+not need to use this attribute. But if necessary, you can override the default process
+name with this attribute, allowing you to spread your app components across
 multiple processes.
 
 <p>
-If the name assigned to this attribute begins with a colon (':'), a new 
-process, private to the application, is created when it's needed and 
+If the name assigned to this attribute begins with a colon (':'), a new
+process, private to the application, is created when it's needed and
 the activity runs in that process.
-If the process name begins with a lowercase character, the activity will run 
+If the process name begins with a lowercase character, the activity will run
 in a global process of that name, provided that it has permission to do so.
-This allows components in different applications to share a process, reducing 
+This allows components in different applications to share a process, reducing
 resource usage.
-</p></dd>
+</p>
+
+<p>The <code><a href="{@docRoot}guide/topics/manifest/application-element.html"
+>&lt;application&gt;</a></code> element's
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html#proc">process</a></code>
+attribute can set a different default process name for all components.
+</dd>
 
 <dt><a name="screen"></a>{@code android:screenOrientation}</dt>
-<dd>The orientation of the activity's display on the device. 
-  
+<dd>The orientation of the activity's display on the device.
+
 <p>The value can be any one of the following strings:</p>
 
 <table>
 <tr>
    <td>"{@code unspecified}"</td>
    <td>The default value.  The system chooses the orientation.  The policy it
-       uses, and therefore the choices made in specific contexts, may differ 
+       uses, and therefore the choices made in specific contexts, may differ
        from device to device.</td>
 </tr><tr>
    <td>"{@code behind}"</td>
-   <td>The same orientation as the activity that's immediately beneath it in 
+   <td>The same orientation as the activity that's immediately beneath it in
        the activity stack.</td>
 </tr><tr>
    <td>"{@code landscape}"</td>
@@ -736,76 +759,76 @@ control whether your app can be installed when a device supports only certain or
 </dd>
 
 <dt><a name="state"></a>{@code android:stateNotNeeded}</dt>
-<dd>Whether or not the activity can be killed and successfully restarted 
-without having saved its state &mdash; "{@code true}" if it can be restarted 
-without reference to its previous state, and "{@code false}" if its previous 
+<dd>Whether or not the activity can be killed and successfully restarted
+without having saved its state &mdash; "{@code true}" if it can be restarted
+without reference to its previous state, and "{@code false}" if its previous
 state is required.  The default value is "{@code false}".
 
 <p>
-Normally, before an activity is temporarily shut down to save resources, its 
-<code>{@link android.app.Activity#onSaveInstanceState onSaveInstanceState()}</code> 
-method is called.  This method stores the current state of the activity in a 
-{@link android.os.Bundle} object, which is then passed to 
-<code>{@link android.app.Activity#onCreate onCreate()}</code> when the activity 
-is restarted.  If this attribute is set to "{@code true}", 
-{@code onSaveInstanceState()} may not be called and {@code onCreate()} will 
-be passed {@code null} instead of the Bundle &mdash; just as it was when the 
+Normally, before an activity is temporarily shut down to save resources, its
+<code>{@link android.app.Activity#onSaveInstanceState onSaveInstanceState()}</code>
+method is called.  This method stores the current state of the activity in a
+{@link android.os.Bundle} object, which is then passed to
+<code>{@link android.app.Activity#onCreate onCreate()}</code> when the activity
+is restarted.  If this attribute is set to "{@code true}",
+{@code onSaveInstanceState()} may not be called and {@code onCreate()} will
+be passed {@code null} instead of the Bundle &mdash; just as it was when the
 activity started for the first time.
 </p>
 
 <p>
-A "{@code true}" setting ensures that the activity can be restarted in the 
-absence of retained state.  For example, the activity that displays the 
-home screen uses this setting to make sure that it does not get removed if it 
+A "{@code true}" setting ensures that the activity can be restarted in the
+absence of retained state.  For example, the activity that displays the
+home screen uses this setting to make sure that it does not get removed if it
 crashes for some reason.
 </p></dd>
 
 <dt><a name="aff"></a>{@code android:taskAffinity}</dt>
-<dd>The task that the activity has an affinity for.  Activities with 
+<dd>The task that the activity has an affinity for.  Activities with
 the same affinity conceptually belong to the same task (to the same
-"application" from the user's perspective).  The affinity of a task 
-is determined by the affinity of its root activity. 
+"application" from the user's perspective).  The affinity of a task
+is determined by the affinity of its root activity.
 
 <p>
-The affinity determines two things &mdash; the task that the activity is re-parented 
-to (see the <code><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">allowTaskReparenting</a></code> 
-attribute) and the task that will house the activity when it is launched 
-with the <code>{@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK}</code> 
+The affinity determines two things &mdash; the task that the activity is re-parented
+to (see the <code><a href="{@docRoot}guide/topics/manifest/activity-element.html#reparent">allowTaskReparenting</a></code>
+attribute) and the task that will house the activity when it is launched
+with the <code>{@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK}</code>
 flag.
 </p>
 
 <p>
 By default, all activities in an application have the same affinity.  You
 can set this attribute to group them differently, and even place
-activities defined in different applications within the same task.  To 
+activities defined in different applications within the same task.  To
 specify that the activity does not have an affinity for any task, set
 it to an empty string.
 
 <p>
-If this attribute is not set, the activity inherits the affinity set 
-for the application (see the 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
-element's 
+If this attribute is not set, the activity inherits the affinity set
+for the application (see the
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+element's
 <code><a href="{@docRoot}guide/topics/manifest/application-element.html#aff">taskAffinity</a></code>
-attribute).  The name of the default affinity for an application is 
-the package name set by the 
-<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code> 
+attribute).  The name of the default affinity for an application is
+the package name set by the
+<code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code>
 element.
 </p>
 
 <dt><a name="theme"></a>{@code android:theme}</dt>
-<dd>A reference to a style resource defining an overall theme for the activity.  
+<dd>A reference to a style resource defining an overall theme for the activity.
 This automatically sets the activity's context to use this theme (see
-<code>{@link android.content.Context#setTheme setTheme()}</code>, and may also 
-cause "starting" animations prior to the activity being launched (to better 
+<code>{@link android.content.Context#setTheme setTheme()}</code>, and may also
+cause "starting" animations prior to the activity being launched (to better
 match what the activity actually looks like).
 
 <p>
-If this attribute is not set, the activity inherits the theme set for the 
-application as a whole &mdash; from the 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
-element's 
-<code><a href="{@docRoot}guide/topics/manifest/application-element.html#theme">theme</a></code> 
+If this attribute is not set, the activity inherits the theme set for the
+application as a whole &mdash; from the
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
+element's
+<code><a href="{@docRoot}guide/topics/manifest/application-element.html#theme">theme</a></code>
 attribute.  If that attribute is also not set, the default system theme is used. For more
 information, see the <a
 href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a> developer guide.
@@ -837,32 +860,32 @@ href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> developer guide.<
 
 <!-- ##api level 3## -->
 <dt><a name="wsoft"></a>{@code android:windowSoftInputMode}</dt>
-<dd>How the main window of the activity interacts with the window containing 
-the on-screen soft keyboard.  The setting for this attribute affects two 
-things: 
+<dd>How the main window of the activity interacts with the window containing
+the on-screen soft keyboard.  The setting for this attribute affects two
+things:
 
-<ul> 
-<li>The state of the soft keyboard &mdash; whether it is hidden or visible 
+<ul>
+<li>The state of the soft keyboard &mdash; whether it is hidden or visible
 &mdash; when the activity becomes the focus of user attention.</li>
 
-<li>The adjustment made to the activity's main window &mdash; whether it is 
-resized smaller to make room for the soft keyboard or whether its contents 
-pan to make the current focus visible when part of the window is covered by 
+<li>The adjustment made to the activity's main window &mdash; whether it is
+resized smaller to make room for the soft keyboard or whether its contents
+pan to make the current focus visible when part of the window is covered by
 the soft keyboard.</li>
 </ul>
 
 <p>
-The setting must be one of the values listed in the following table, or a 
-combination of one "{@code state...}" value plus one "{@code adjust...}" 
-value.  Setting multiple values in either group &mdash; multiple 
-"{@code state...}" values, for example &mdash; has undefined results.  
+The setting must be one of the values listed in the following table, or a
+combination of one "{@code state...}" value plus one "{@code adjust...}"
+value.  Setting multiple values in either group &mdash; multiple
+"{@code state...}" values, for example &mdash; has undefined results.
 Individual values are separated by a vertical bar ({@code |}).  For example:
 </p>
 
 <pre>&lt;activity android:windowSoftInputMode="stateVisible|adjustResize" . . . &gt;</pre>
 
 <p>
-Values set here (other than "{@code stateUnspecified}" and 
+Values set here (other than "{@code stateUnspecified}" and
 "{@code adjustUnspecified}") override values set in the theme.
 </p>
 
@@ -872,9 +895,9 @@ Values set here (other than "{@code stateUnspecified}" and
    <th>Description</th>
 </tr><tr>
    <td>"{@code stateUnspecified}"</td>
-   <td>The state of the soft keyboard (whether it is hidden or visible) 
+   <td>The state of the soft keyboard (whether it is hidden or visible)
        is not specified.  The system will choose an appropriate state or
-       rely on the setting in the theme.  
+       rely on the setting in the theme.
 
        <p>
        This is the default setting for the behavior of the soft keyboard.
@@ -885,32 +908,32 @@ Values set here (other than "{@code stateUnspecified}" and
        whether visible or hidden, when the activity comes to the fore.</td>
 </tr></tr>
    <td>"{@code stateHidden}"</td>
-   <td>The soft keyboard is hidden when the user chooses the activity 
-       &mdash; that is, when the user affirmatively navigates forward to the 
+   <td>The soft keyboard is hidden when the user chooses the activity
+       &mdash; that is, when the user affirmatively navigates forward to the
        activity, rather than backs into it because of leaving another activity.</td>
 </tr></tr>
    <td>"{@code stateAlwaysHidden}"</td>
-   <td>The soft keyboard is always hidden when the activity's main window 
+   <td>The soft keyboard is always hidden when the activity's main window
        has input focus.</td>
 </tr></tr>
    <td>"{@code stateVisible}"</td>
-   <td>The soft keyboard is visible when that's normally appropriate 
+   <td>The soft keyboard is visible when that's normally appropriate
        (when the user is navigating forward to the activity's main window).</td>
 </tr></tr>
    <td>"{@code stateAlwaysVisible}"</td>
-   <td>The soft keyboard is made visible when the user chooses the 
-       activity &mdash; that is, when the user affirmatively navigates forward 
-       to the activity, rather than backs into it because of leaving another 
+   <td>The soft keyboard is made visible when the user chooses the
+       activity &mdash; that is, when the user affirmatively navigates forward
+       to the activity, rather than backs into it because of leaving another
        activity.</td>
 </tr></tr>
    <td>"{@code adjustUnspecified}"</td>
-   <td>It is unspecified whether the activity's main window resizes 
-       to make room for the soft keyboard, or whether the contents 
-       of the window pan to make the currentfocus visible on-screen. 
+   <td>It is unspecified whether the activity's main window resizes
+       to make room for the soft keyboard, or whether the contents
+       of the window pan to make the current focus visible on-screen.
        The system will automatically select one of these modes depending
-       on whether the content of the window has any layout views that 
-       can scroll their contents.  If there is such a view, the window 
-       will be resized, on the assumption that scrolling can make all 
+       on whether the content of the window has any layout views that
+       can scroll their contents.  If there is such a view, the window
+       will be resized, on the assumption that scrolling can make all
        of the window's contents visible within a smaller area.
 
        <p>
@@ -918,14 +941,14 @@ Values set here (other than "{@code stateUnspecified}" and
        </p></td>
 </tr></tr>
    <td>"{@code adjustResize}"</td>
-   <td>The activity's main window is always resized to make room for 
+   <td>The activity's main window is always resized to make room for
        the soft keyboard on screen.</td>
 </tr></tr>
    <td>"{@code adjustPan}"</td>
    <td>The activity's main window is not resized to make room for the soft
-       keyboard.  Rather, the contents of the window are automatically 
+       keyboard.  Rather, the contents of the window are automatically
        panned so that the current focus is never obscured by the keyboard
-       and users can always see what they are typing.  This is generally less 
+       and users can always see what they are typing.  This is generally less
        desirable than resizing, because the user may need to close the soft
        keyboard to get at and interact with obscured parts of the window.</td>
 </tr>
@@ -938,12 +961,12 @@ This attribute was introduced in API Level 3.
 
 <!-- ##api level indication## -->
 <dt>introduced in:</dt>
-<dd>API Level 1 for all attributes except for 
+<dd>API Level 1 for all attributes except for
 <code><a href="#nohist">noHistory</a></code> and
-<code><a href="#wsoft">windowSoftInputMode</a></code>, which were added in API 
+<code><a href="#wsoft">windowSoftInputMode</a></code>, which were added in API
 Level 3.</dd>
 
 <dt>see also:</dt>
-<dd><code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code> 
+<dd><code><a href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application&gt;</a></code>
 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html">&lt;activity-alias&gt;</a></code></dd>
 </dl>
index c5bbdbc..23ef518 100644 (file)
@@ -4,6 +4,14 @@ parent.title=User Interface
 parent.link=index.html
 @jd:body
 
+
+<a class="notice-designers top" href="{@docRoot}design/patterns/actionbar.html">
+  <div>
+    <h3>Design Guide</h3>
+    <p>Action Bar</p>
+  </div>
+</a>
+
 <div id="qv-wrapper">
 <div id="qv">
 
@@ -12,23 +20,20 @@ parent.link=index.html
   <li><a href="#Adding">Adding the Action Bar</a>
     <ol>
       <li><a href="#Removing">Removing the action bar</a></li>
+      <li><a href="#Logo">Using a logo instead of an icon</a></li>
     </ol>
   </li>
   <li><a href="#ActionItems">Adding Action Items</a>
     <ol>
-      <li><a href="#ChoosingActionItems">Choosing your action items</a></li>
+      <li><a href="#ActionEvents">Handling clicks on action items</a></li>
       <li><a href="#SplitBar">Using split action bar</a></li>
     </ol>
   </li>
-  <li><a href="#Home">Using the App Icon for Navigation</a>
-    <ol>
-      <li><a href="#Up">Navigating up</a></li>
-    </ol>
-  </li>
+  <li><a href="#Home">Navigating Up with the App Icon</a></li>
   <li><a href="#ActionView">Adding an Action View</a>
     <ol>
       <li><a href="#ActionViewCollapsing">Handling collapsible action views</a></li>
-    </ol>  
+    </ol>
   </li>
   <li><a href="#ActionProvider">Adding an Action Provider</a>
     <ol>
@@ -44,662 +49,600 @@ parent.link=index.html
       <li><a href="#ActionItemStyles">Action items</a></li>
       <li><a href="#NavigationStyles">Navigation tabs</a></li>
       <li><a href="#DropDownStyles">Drop-down lists</a></li>
-      <li><a href="#AdvancedStyles">Advanced styling</a></li>
+      <li><a href="#StyleExample">Example theme</a></li>
     </ol>
   </li>
 </ol>
 
   <h2>Key classes</h2>
   <ol>
-    <li>{@link android.app.ActionBar}</li>
+    <li>{@link android.support.v7.app.ActionBar}</li>
     <li>{@link android.view.Menu}</li>
-    <li>{@link android.view.ActionProvider}</li>
   </ol>
 
-  <h2>Related samples</h2>
-  <ol>
-    <li><a
-href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a></li>
-    <li><a
-href="{@docRoot}resources/samples/ActionBarCompat/index.html">Action Bar Compatibility</a></li>
-    <li><a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#ActionBar">
-API Demos</a></li>
-  </ol>
-
-  <h2>See also</h2>
-  <ol>
-    <li><a
-href="{@docRoot}design/patterns/actionbar.html">Android Design: Action Bar</a></li>
-    <li><a href="{@docRoot}guide/topics/ui/menus.html">Menus</a></li>
-    <li><a href="{@docRoot}guide/practices/tablets-and-handsets.html">Supporting Tablets
-and Handsets</a></li>
-  </ol>
 </div>
 </div>
 
-<p>The action bar is a window feature that identifies the application and user location, and
-provides user actions and navigation modes. You should use the action bar in most activities that
-need to prominently present user actions or global navigation, because the action bar offers users a
-consistent interface across applications and the system gracefully adapts the action bar's
-appearance for different screen configurations. You can control the behaviors and visibility of the
-action bar with the {@link android.app.ActionBar} APIs, which were added in Android 3.0 (API level
-11).</p>
+<p>The action bar is a window feature that identifies the user location, and
+provides user actions and navigation modes. Using the action bar offers your users a
+familiar interface across applications that the system gracefully adapts
+for different screen configurations.</p>
 
-<p>The primary goals of the action bar are to:</p>
+<img src="{@docRoot}images/ui/actionbar@2x.png" alt="" width="428" height="215" />
+<p class="img-caption"><strong>Figure 1.</strong> An action bar that includes the [1] app icon,
+[2] two action items, and [3] action overflow.</p>
 
-<ul>
-  <li>Provide a dedicated space for identifying the application brand and user location.
-    <p>This is accomplished with the app icon or logo on the left side and the activity title.
-You might choose to remove the activity title, however, if the current view is identified by a
-navigation label, such as the currently selected tab.</p></li>
-
-  <li>Provide consistent navigation and view refinement across different applications.
-    <p>The action bar provides built-in tab navigation for switching between <a
-href="{@docRoot}guide/components/fragments.html">fragments</a>. It also offers a drop-down
-list you can use as an alternative navigation mode or to refine the current view (such as to sort
-a list by different criteria).</p>
-  </li>
+<p>The action bar provides several key functions:</p>
 
-  <li>Make key actions for the activity (such as "search", "create", "share", etc.) prominent and
-accessible to the user in a predictable way.
-    <p>You can provide instant access to key user actions by placing items from the <a
-href="{@docRoot}guide/topics/ui/menus.html#OptionsMenu">options menu</a> directly in the action bar,
-as "action items." Action items can also provide an "action view," which provides an embedded
-widget for even more immediate action behaviors. Menu items that are not promoted
-to an action item are available in the overflow menu, revealed by either the device <em>Menu</em>
-button
-(when available) or by an "overflow menu" button in the action bar (when the device does not
-include a <em>Menu</em> button).</p>
-</li>
+<ul>
+  <li>Provides a dedicated space for giving your app an identity and indicating the user's
+  location in the app.</li>
+  <li>Makes important actions prominent and accessible in a predictable way
+  (such as <em>Search</em>).</li>
+  <li>Supports consistent navigation and view switching within apps (with tabs or drop-down
+  lists).</li>
 </ul>
 
-<img src="{@docRoot}images/ui/actionbar.png" alt="" width="440" />
-<p class="img-caption"><strong>Figure 1.</strong> Action bar from the <a
-href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> app (on a
-landscape handset), showing the logo on the left, navigation tabs, and an action item on the
-right (plus the overflow menu button).</p>
+<p>For more information about the action bar's interaction patterns and design guidelines,
+see the <a href="{@docRoot}design/patterns/actionbar.html">Action Bar</a>
+design guide.</p>
 
-<p class="note"><strong>Note:</strong> If you're looking for information about the contextual
-action bar for displaying contextual action items, see the <a
-href="{@docRoot}guide/topics/ui/menus.html#context-menu">Menu</a> guide.</p>
+<p>The {@link android.app.ActionBar} APIs were first added in Android 3.0 (API level 11) but they
+are also available in the <a href="{@docRoot}tools/support-library/index.html">Support Library</a>
+for compatibility with Android 2.2 (API level 7) and above.</p>
+
+<p><b>This guide focuses on how to use the
+support library's action bar</b>, but if your app supports <em>only</em> Android 3.0 or higher, you
+should use the {@link android.app.ActionBar} APIs in the framework. Most of the APIs are
+the same&mdash;but reside in a different package namespace&mdash;with a few exceptions to method
+names or signatures that are noted in the sections below.</p>
 
 
-<div class="note design">
-<p><strong>Action Bar Design</strong></p>
-  <p>For design guidelines, read Android Design's <a
-href="{@docRoot}design/patterns/actionbar.html">Action Bar</a> guide.</p>
+<div class="caution">
+<p><strong>Caution:</strong> Be certain you import
+the {@code ActionBar} class (and related APIs) from the appropriate package:</p>
+<ul>
+<li>If supporting API levels <em>lower than</em> 11: <br>
+{@code import android.support.v7.app.ActionBar}</li>
+<li>If supporting <em>only</em> API level 11 and higher: <br>
+{@code import android.app.ActionBar}</li>
+</ul>
 </div>
 
 
+<p class="note"><strong>Note:</strong> If you're looking for information about the <em>contextual
+action bar</em> for displaying contextual action items, see the <a
+href="{@docRoot}guide/topics/ui/menus.html#context-menu">Menu</a> guide.</p>
 
-<div class="sidebox-wrapper">
-<div class="sidebox">
-  <h2>Remaining backward-compatible</h2>
-<p>If you want to provide an action bar in your application <em>and</em> remain compatible with
-versions of Android older than 3.0, you need to create the action bar in your
-activity's layout (because the {@link android.app.ActionBar} class is not available on older
-versions).</p>
-<p>To help you, the <a
-href="{@docRoot}resources/samples/ActionBarCompat/index.html">Action Bar Compatibility</a> sample
-app provides an API layer and action bar layout that allows your app to use some of the {@link
-android.app.ActionBar} APIs and also support older versions of Android by replacing the traditional
-title bar with a custom action bar layout.</p>
-</div>
-</div>
 
 
 <h2 id="Adding">Adding the Action Bar</h2>
 
-<p>Beginning with Android 3.0 (API level 11), the action bar is included in all
-activities that use the {@link android.R.style#Theme_Holo Theme.Holo} theme (or one of its
-descendants), which is the default theme when either the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> or
-<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>
-attribute is set to {@code "11"} or greater. For example:</p>
+<p>As mentioned above, this guide focuses on how to use the {@link
+android.support.v7.app.ActionBar} APIs in the support library. So before you can add the action
+bar, you must set up your project with the <strong>appcompat v7</strong> support library by
+following the instructions in the <a href="{@docRoot}tools/support-library/setup.html">Support
+Library Setup</a>.</p>
 
-<pre>
-&lt;manifest ... &gt;
-    &lt;uses-sdk android:minSdkVersion="4"
-              <b>android:targetSdkVersion="11"</b> /&gt;
-    ...
-&lt;/manifest&gt;
-</pre>
+<p>Once your project is set up with the support library, here's how to add the action bar:</p>
+<ol>
+  <li>Create your activity by extending {@link android.support.v7.app.ActionBarActivity}.</li>
+  <li>Use (or extend) one of the {@link android.support.v7.appcompat.R.style#Theme_AppCompat
+  Theme.AppCompat} themes for your activity. For example:
+  <pre>&lt;activity android:theme="@style/Theme.AppCompat.Light" ... ></pre>
+  </li>
+</ol>
 
-<p>In this example, the application requires a minimum version of API Level 4 (Android 1.6), but it
-also targets API level 11 (Android 3.0). This way, when the application runs on Android 3.0 or
-greater, the system applies the holographic theme to each activity, and thus, each activity includes
-the action bar.</p>
+<p>Now your activity includes the action bar when running on Android 2.2 (API level 7) or higher.
+</p>
 
-<p>If you want to use {@link android.app.ActionBar} APIs, such as to add navigation modes and modify
-action bar styles, you should set the <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> to {@code
-"11"} or greater. If you want your app
-to support older versions of Android, there are ways to use a limited set of {@link
-android.app.ActionBar} APIs on devices that support API level 11 or higher, while still running
-on older versions. See the sidebox for information about remaining backward-compatible.</p>
+<div class="note">
+<p><b>On API level 11 or higher</b></p>
+<p>The action bar is included in all activities that use the
+{@link android.R.style#Theme_Holo Theme.Holo} theme (or one of its
+descendants), which is the default theme when either the <a
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code targetSdkVersion}</a> or
+<a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>
+attribute is set to {@code "11"} or higher. If you don't want the action bar for an
+activity, set the activity theme to {@link android.R.style#Theme_Holo_NoActionBar
+Theme.Holo.NoActionBar}.</p>
+</div>
 
 
 <h3 id="Removing">Removing the action bar</h3>
 
-<p>If you don't want the action bar for a particular activity, set the activity theme to
-{@link android.R.style#Theme_Holo_NoActionBar Theme.Holo.NoActionBar}. For example:</p>
-
-<pre>
-&lt;activity android:theme="&#64;android:style/Theme.Holo.NoActionBar"&gt;
-</pre>
-
-<p>You can also hide the action bar at runtime by calling {@link android.app.ActionBar#hide}. For
-example:</p>
+<p>You can hide the action bar at runtime by calling {@link android.support.v7.app.ActionBar#hide}.
+For example:</p>
 
 <pre>
-ActionBar actionBar = {@link android.app.Activity#getActionBar()};
+ActionBar actionBar = {@link android.support.v7.app.ActionBarActivity#getSupportActionBar()};
 actionBar.hide();
 </pre>
 
-<p>When the action bar hides, the system adjusts your activity layout to fill all the
-screen space now available. You can bring the action bar back with {@link
-android.app.ActionBar#show()}.</p>
+<div class="note">
+<p><b>On API level 11 or higher</b></p>
+<p>Get the {@link android.app.ActionBar} with the {@link android.app.Activity#getActionBar}
+method.</p>
+</div>
+
+<p>When the action bar hides, the system adjusts your layout to fill the
+screen space now available. You can bring the action bar back by calling {@link
+android.support.v7.app.ActionBar#show()}.</p>
 
 <p>Beware that hiding and removing the action bar causes your activity to re-layout in order to
-account for the space consumed by the action bar. If your activity regularly hides and shows the
-action bar (such as in the Android Gallery app), you might want to use overlay mode. Overlay mode
-draws the action bar on top of your activity layout rather than in its own area of the screen. This
+account for the space consumed by the action bar. If your activity often hides and shows the
+action bar, you might want to enable <em>overlay mode</em>. Overlay mode
+draws the action bar in front of your activity layout, obscuring the top portion. This
 way, your layout remains fixed when the action bar hides and re-appears. To enable overlay mode,
-create a theme for your activity and set {@link android.R.attr#windowActionBarOverlay
-android:windowActionBarOverlay} to {@code true}. For more information, see the section about <a
+create a custom theme for your activity and set {@link
+android.support.v7.appcompat.R.attr#windowActionBarOverlay
+windowActionBarOverlay} to {@code true}. For more information, see the section below about <a
 href="#Style">Styling the Action Bar</a>.</p>
 
-<p class="note"><strong>Tip:</strong> If you have a custom activity theme in which you'd like to
-remove the action bar, set the {@link android.R.styleable#Theme_windowActionBar
-android:windowActionBar} style property to {@code false}. However, if you remove the action bar
-using a theme, then the window will not allow the action bar at all, so you cannot add it
-later&mdash;calling {@link android.app.Activity#getActionBar()} will return null.</p>
+
+<h3 id="Logo">Using a logo instead of an icon</h3>
+
+<p>By default, the system uses your application icon in the action bar, as specified by the <a
+href="{@docRoot}guide/topics/manifest/application-element.html#icon">{@code icon}</a>
+attribute in the <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
+&lt;application&gt;}</a> or <a
+href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
+&lt;activity&gt;}</a> element. However, if you also specify the <a
+href="{@docRoot}guide/topics/manifest/application-element.html#logo">{@code logo}</a>
+attribute, then the action bar uses the logo image instead of the icon.</p>
+
+<p>A logo should usually be wider than the icon, but should not include unnecessary text. You
+should generally use a logo only when it represents your brand in a traditional format that users
+recognize. A good example is the YouTube app's logo&mdash;the logo represents the expected user
+brand, whereas the app's icon is a modified version that conforms to the square requirement
+for the launcher icon.</p>
+
 
 
 
 <h2 id="ActionItems">Adding Action Items</h2>
 
-<p>Sometimes you might want to give users immediate access to an item from the <a
-href="{@docRoot}guide/topics/ui/menus.html#OptionsMenu">options menu</a>. To do this, you can
-declare that the menu item should appear in the action bar as an "action item." An action item can
-include an icon and/or a text title. If a menu item does not appear as an action item, then the
-system places it in the overflow menu. The overflow menu is revealed either by the device
-<em>Menu</em>
-button (if provided by the device) or an additional button in the action bar (if the device does not
-provide the <em>Menu</em> button).</p>
-
-<div class="figure" style="width:359px">
-  <img src="{@docRoot}images/ui/actionbar-item-withtext.png" height="57" alt="" />
-  <p class="img-caption"><strong>Figure 2.</strong> Two action items with icon and text titles, and
-the overflow menu button.</p>
+<div class="figure" style="width:340px">
+  <img src="{@docRoot}images/ui/actionbar-item-withtext.png" width="340" alt="" />
+  <p class="img-caption"><strong>Figure 2.</strong> Action bar with three action buttons and
+the overflow button.</p>
 </div>
 
-<p>When the activity first starts, the system populates the action bar and overflow menu by calling
-{@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} for your activity. As
-discussed in the <a href="{@docRoot}guide/topics/ui/menus.html">Menus</a> developer guide, it's in
-this callback method that you should inflate an XML <a
-href="{@docRoot}guide/topics/resources/menu-resource.html">menu resource</a> that defines the
-menu items. For example:</p>
+<p>The action bar provides users access to the most important action
+items relating to the app's current
+context. Those that appear directly in the action bar with an icon and/or text are known
+as <em>action buttons</em>. Actions that can't fit in the action bar or aren't
+important enough are hidden in the action overflow.
+The user can reveal a list of the other actions by pressing the overflow button
+on the right side (or the device <em>Menu</em> button, if available).</p>
+
+<p>When your activity starts, the system populates the action items by calling your activity's
+{@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method. Use this
+method to inflate a <a
+href="{@docRoot}guide/topics/resources/menu-resource.html">menu resource</a> that defines all the
+action items. For example, here's a menu resource defining a couple of menu items:</p>
+
+<p class="code-caption">res/menu/main_activity_actions.xml</p>
+<pre>
+&lt;menu xmlns:android="http://schemas.android.com/apk/res/android" >
+    &lt;item android:id="@+id/action_search"
+          android:icon="@drawable/ic_action_search"
+          android:title="@string/action_search"/&gt;
+    &lt;item android:id="@+id/action_compose"
+          android:icon="@drawable/ic_action_compose"
+          android:title="@string/action_compose" /&gt;
+&lt;/menu&gt;
+</pre>
+
+<p>Then in your activity's {@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()}
+method, inflate the menu resource into the given {@link android.view.Menu}
+to add each item to the action bar:</p>
 
 <pre>
 &#64;Override
 public boolean onCreateOptionsMenu(Menu menu) {
+    // Inflate the menu items for use in the action bar
     MenuInflater inflater = getMenuInflater();
-    inflater.inflate(R.menu.main_activity, menu);
-    return true;
+    inflater.inflate(R.menu.main_activity_actions, menu);
+    return super.onCreateOptionsMenu(menu);
 }
 </pre>
 
-<p>In the XML file, you can request a menu item to appear as an action item by declaring {@code
-android:showAsAction="ifRoom"} for the {@code &lt;item&gt;} element. This way, the menu item appears
-in the action bar for quick access only <em>if there is room</em> available. If there's not
-enough room, the item appears in the overflow menu.</p>
+<p>To request that an item appear directly in the action bar
+as an action button, include {@code
+showAsAction="ifRoom"} in the {@code &lt;item&gt;} tag. For example:</p>
 
-<p>If your menu item supplies both a title and an icon&mdash;with the {@code android:title} and
-{@code android:icon} attributes&mdash;then the action item shows only the icon by default. If you
-want to display the text title, add {@code "withText"} to the {@code android:showAsAction}
+<pre>
+&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
+      <strong>xmlns:example.app="http://schemas.android.com/apk/res-auto"</strong> >
+    &lt;item android:id="@+id/action_search"
+          android:icon="@drawable/ic_action_search"
+          android:title="@string/action_search"
+          <strong>example.app:showAsAction="ifRoom"</strong>  /&gt;
+    ...
+&lt;/menu&gt;
+</pre>
+
+<p>If there's not enough room for the item in the action bar, it will appear in the action
+overflow.</p>
+
+
+<div class="note" id="XmlAttributes">
+<p><strong>Using XML attributes from the support library</strong></p>
+Notice that the {@code showAsAction} attribute above uses a custom namespace defined in the
+{@code &lt;menu>} tag. This is necessary when using any XML attributes defined by the support
+library, because these attributes do not exist in the Android framework on older devices.
+So you must use your own namespace as a prefix for all attributes defined by the support library.
+</p>
+</div>
+
+<p>If your menu item supplies both a title and an icon&mdash;with the {@code title} and
+{@code icon} attributes&mdash;then the action item shows only the icon by default. If you
+want to display the text title, add {@code "withText"} to the {@code showAsAction}
 attribute. For example:</p>
 
 <pre>
-&lt;?xml version="1.0" encoding="utf-8"?&gt;
-&lt;menu xmlns:android="http://schemas.android.com/apk/res/android">
-    &lt;item android:id="@+id/menu_save"
-          android:icon="@drawable/ic_menu_save"
-          android:title="@string/menu_save"
-          <b>android:showAsAction="ifRoom|withText"</b> /&gt;
-&lt;/menu&gt;
+&lt;item example.app:showAsAction="ifRoom|withText" ... /&gt;
 </pre>
 
 <p class="note"><strong>Note:</strong> The {@code "withText"} value is a <em>hint</em> to the
 action bar that the text title should appear. The action bar will show the title when possible, but
 might not if an icon is available and the action bar is constrained for space.</p>
 
-<p>When the user selects an action item, your activity receives a call to
-{@link android.app.Activity#onOptionsItemSelected(MenuItem)
-onOptionsItemSelected()}, passing the ID supplied by the {@code android:id} attribute&mdash;the same
-callback received for all items in the options menu.</p>
-
-<p>It's important that you always define {@code android:title} for each menu item&mdash;even if you
-don't declare that the title appear with the action item&mdash;for three reasons:</p>
+<p>You should always define the {@code title} for each item even if you don't declare that
+the title appear with the action item, for the following reasons:</p>
 <ul>
   <li>If there's not enough room in the action bar for the action item, the menu item appears
-in the overflow menu and only the title appears.</li>
+in the overflow where only the title appears.</li>
   <li>Screen readers for sight-impaired users read the menu item's title.</li>
   <li>If the action item appears with only the icon, a user can long-press the item to reveal a
-tool-tip that displays the action item's title.</li>
+tool-tip that displays the action title.</li>
 </ul>
 
-<p>The {@code android:icon} is always optional, but recommended. For icon design recommendations,
-see the <a href="{@docRoot}guide/practices/ui_guidelines/icon_design_action_bar.html">Action Bar
-Icon</a> design guidelines.</p>
-
-<p class="note"><strong>Note:</strong> If you added the menu item from a fragment, via the {@link
-android.app.Fragment} class's {@link android.app.Fragment#onCreateOptionsMenu onCreateOptionsMenu}
-callback, then the system calls the respective {@link
-android.app.Fragment#onOptionsItemSelected(MenuItem) onOptionsItemSelected()} method for that
-fragment when the user selects one of the fragment's items. However the activity gets a chance to
-handle the event first, so the system calls {@link
-android.app.Activity#onOptionsItemSelected(MenuItem) onOptionsItemSelected()} on the activity before
-calling the same callback for the fragment.</p>
-
-<p>You can also declare an item to <em>"always"</em> appear as an action item, instead of being
-placed in the overflow menu when space is limited. In most cases, you <strong>should not</strong>
-force an item to appear in the action bar by using the {@code "always"} value. However, you might
-need an item to always appear when it provides an <a href="#ActionView">action view</a> that does
-not offer a default action for the overflow menu. Beware that too
-many action items can create a cluttered UI and cause layout problems on devices with a narrow
-screen. It's best to instead use {@code "ifRoom"} to request that an item appear in the action
-bar, but allow the system to move it into the overflow menu when there's not enough room.</p>
-
-<p>For more information about creating the options menu that defines your action items, see the <a
-href="{@docRoot}guide/topics/ui/menus.html#options-menu">Menus</a> developer guide.</p>
-
-
-
-<h3 id="ChoosingActionItems">Choosing your action items</h3>
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
- <h4>Menu items vs. other app controls</h4>
- <p>As a general rule, all items in the <a
-href="{@docRoot}guide/topics/ui/menus.html#OptionsMenu">options menu</a> (let alone action items)
-should have a global impact on the app, rather than affect only a small portion of the interface.
-For example, if you have a multi-pane layout and one pane shows a video while another lists all
-videos, the video player controls should appear within the pane containing the video (not in the
-action bar), while the action bar might provide action items to share the video or save the video to
-a favorites list.</p>
-  <p>So, even before deciding whether a menu item should appear as an action item, be sure that
-the item has a global scope for the current activity. If it doesn't, then you should place it
-as a button in the appropriate context of the activity layout.</p>
-</div>
-</div>
+<p>The {@code icon} is optional, but recommended. For icon design recommendations,
+see the <a href="{@docRoot}design/style/iconography.html#action-bar">Iconography</a> design
+guide. You can also download a set of standard action bar icons (such as for Search or Discard)
+from the <a href="{@docRoot}design/downloads/index.html">Downloads</a> page.</p>
 
-<p>You should carefully choose which items from your options menu should appear as action items by
-assessing a few key traits. In general, each action item should be <em>at least one</em>
-of the following:</p>
+<p>You can also use {@code "always"} to declare that an item always appear as an action button.
+However, you <strong>should not</strong> force an item to appear in the action bar this
+way. Doing so can create layout problems on devices with a narrow screen. It's best to instead
+use {@code "ifRoom"} to request that an item appear in the action bar, but allow the system to move
+it into the overflow when there's not enough room. However, it might be necessary to use this value
+if the item includes an <a href="#ActionView">action view</a> that cannot be collapsed and
+must always be visible to provide access to a critical feature.</p>
 
-<ol>
-  <li><strong>Frequently used</strong>: It's an action that your users need seven out of ten visits
-or they use it several times in a row.
-    <p>Example frequent actions: "New message" in the Messaging app and
-"Search" on Google Play.</p>
-  </li>
-
-  <li><strong>Important</strong>: It's an action that you need users to easily discover or, if it's
-not frequently used, it's important that it be effortless to perform in the few cases that users do
-need it.
-    <p>Example important actions: "Add network" in Wi-Fi settings and "Switch to camera" in the
-Gallery app.</p>
-  </li>
 
-  <li><strong>Typical</strong>: It's an action that is typically provided in the action bar in
-similar apps, so your users expect to find it in yours.
-    <p>Example typical actions: "Refresh" in an email or social app, and "New contact" in the
-People app.</p>
-</ol>
 
-<p>If you believe that more than four of your menu items can be justified as action items, then you
-should carefully consider their relative level of importance and try to set no more than four as
-action items (and do so using the {@code "ifRoom"} value to allow the system to put some back in the
-overflow menu when space is limited on smaller screens). Even if space is available on a wide
-screen, you should not create a long stream of action items that clutter the UI and appear like a
-desktop toolbar, so keep the number of action items to a minimum.</p>
 
-<p>Additionally, the following actions should never appear as action items: Settings, Help,
-Feedback, or similar. Always keep them in the overflow menu.</p>
+<h3 id="ActionEvents">Handling clicks on action items</h3>
 
-<p class="note"><strong>Note:</strong> Remember that not all devices provide a dedicated hardware
-button for Search, so if it's an important feature in your app, it should always appear as an
-action item (and usually as the first item, especially if you offer it with an <a
-href="#ActionView">action view</a>).</p>
+<p>When the user presses an action, the system calls your activity's {@link
+android.app.Activity#onOptionsItemSelected(MenuItem) onOptionsItemSelected()} method. Using the
+{@link android.view.MenuItem} passed to this method, you can identify the action by calling {@link
+android.view.MenuItem#getItemId()}. This returns the unique ID provided by the {@code &lt;item&gt;}
+tag's {@code id} attribute so you can perform the appropriate action. For example:</p>
 
+<pre>
+&#64;Override
+public boolean onOptionsItemSelected(MenuItem item) {
+    // Handle presses on the action bar items
+    switch (item.getItemId()) {
+        case R.id.action_search:
+            openSearch();
+            return true;
+        case R.id.action_compose:
+            composeMessage();
+            return true;
+        default:
+            return super.onOptionsItemSelected(item);
+    }
+}
+</pre>
 
+<p class="note"><strong>Note:</strong> If you inflate menu items from a fragment, via the {@link
+android.app.Fragment} class's {@link android.app.Fragment#onCreateOptionsMenu onCreateOptionsMenu()}
+callback, the system calls {@link
+android.app.Fragment#onOptionsItemSelected(MenuItem) onOptionsItemSelected()} for that
+fragment when the user selects one of those items. However, the activity gets a chance to
+handle the event first, so the system first calls {@link
+android.app.Activity#onOptionsItemSelected(MenuItem) onOptionsItemSelected()} on the activity,
+before calling the same callback for the fragment. To ensure that any fragments in the
+activity also have a chance to handle the callback, always pass the call to the superclass
+as the default behavior instead of returning {@code false} when you do not handle the item.</p>
+
+
+
+<div class="figure" style="width:420px;margin-top:0">
+<img src="{@docRoot}images/ui/actionbar-splitaction@2x.png" alt="" width="420"/>
+<p class="img-caption"><strong>Figure 3.</strong> Mock-ups showing an action bar with
+tabs (left), then with split action bar (middle); and with the app icon and title disabled
+(right).</p>
+</p>
+</div>
 
 <h3 id="SplitBar">Using split action bar</h3>
 
-<p>When your application is running on Android 4.0 (API level 14) and higher, there's an extra mode
-available for the action bar called "split action bar." When you enable split action bar, a separate
-bar appears at the bottom of the screen to display all action items when the activity is running on
-a narrow screen (such as a portrait-oriented handset). Splitting the action bar to separate
-the action items ensures that a reasonable amount of space is available to display all your action
+<p>Split action bar provides a separate
+bar at the bottom of the screen to display all action items when the activity is running on
+a narrow screen (such as a portrait-oriented handset).</p>
+
+<p>Separating the action items this way
+ensures that a reasonable amount of space is available to display all your action
 items on a narrow screen, while leaving room for navigation and title elements at the top.</p>
 
-<p>To enable split action bar, simply add {@code uiOptions="splitActionBarWhenNarrow"} to your
+<p>To enable split action bar when using the support library, you must do two things:</p>
+<ol>
+  <li>Add {@code uiOptions="splitActionBarWhenNarrow"} to your
 <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;}</a> or
 <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code &lt;application&gt;}</a>
-manifest element.</p>
+manifest element. This attribute is understood only by API level 14 and higher (it is ignored
+by older versions).
+  <li>For older versions, create a custom theme that extends one of the {@link
+  android.support.v7.appcompat.R.style#Theme_AppCompat Theme.AppCompat} themes, and include
+  the {@link android.support.v7.appcompat.R.attr#windowSplitActionBar windowSplitActionBar} style
+  set {@code true}. For example:
+  <p class="code-caption">res/values/styles.xml</p>
+  <pre>
+&lt;style name="MyAppTheme" parent="Theme.AppCompat.Light">
+  &lt;item name="windowSplitActionBar">true&lt;item>
+&lt;/style>
+</pre>
 
-<p>Be aware that Android adjusts the action bar's appearance in a variety of ways, based on the
-current screen size. Using split action bar is just one option that you can enable to allow the
-action bar to further optimize the user experience for different screen sizes. In doing so, you
-may also allow the action bar to collapse navigation tabs into the main action bar. That is, if you
-use <a href="#Tabs">navigation tabs</a> in your action bar, once the action items are
-separated on a narrow screen, the navigation tabs may be able to fit into the main action bar rather
-than be separated into the "stacked action bar." Specifically, if you've disabled the action bar
-icon and title (with {@link android.app.ActionBar#setDisplayShowHomeEnabled
-setDisplayShowHomeEnabled(false)} and {@link android.app.ActionBar#setDisplayShowTitleEnabled
-setDisplayShowTitleEnabled(false)}), then the navigation tabs collapse into the main action bar, as
-shown by the second device in figure 3.</p>
+  <p>Then set this as your activity theme:</p>
 
-<img src="{@docRoot}images/practices/actionbar-phone-splitaction.png" alt=""/>
-<p class="img-caption"><strong>Figure 3.</strong> Mock-ups of split action bar with navigation tabs
-on the left; with the app icon and title disabled on the right.</p>
+  <p class="code-caption">AndroidManifest.xml</p>
+  <pre>
+&lt;manifest ...>
+    &lt;activity android:theme="&#64;style/MyAppTheme" ...>
+    ...
+&lt;/manifest ...>
+</pre>
+  </li>
+</ol>
 
-<p class="note"><strong>Note:</strong> Although the {@link android.R.attr#uiOptions
-android:uiOptions} attribute was added in Android 4.0 (API level 14), you can safely include it in
-your application even if your <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a> is set to
-a value lower than {@code "14"} to remain compatible with older versions of Android. When running on
-older versions, the system simply ignores the XML attribute because it doesn't understand it. The
-only condition to including it in your manifest is that you must compile your application against a
-platform version that supports API level 14 or higher. Just be sure that you don't openly use other
-APIs in your application code that aren't supported by the version declared by your <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>
-attribute&mdash;only XML attributes are safely ignored by older platforms.</p>
 
+<p>Using split action bar also allows <a href="#Tabs">navigation tabs</a> to collapse into the
+main action bar if you remove the icon and title (as shown on the right in figure 3).
+To create this effect, disable the action bar
+icon and title with {@link android.support.v7.app.ActionBar#setDisplayShowHomeEnabled
+setDisplayShowHomeEnabled(false)} and {@link
+android.support.v7.app.ActionBar#setDisplayShowTitleEnabled setDisplayShowTitleEnabled(false)}.</p>
 
 
 
-<h2 id="Home">Using the App Icon for Navigation</h2>
+<h2 id="Home">Navigating Up with the App Icon</h2>
 
+<a class="notice-designers" href="{@docRoot}design/patterns/navigation.html">
+  <div>
+    <h3>Design Guide</h3>
+    <p>Navigation with Back and Up</p>
+  </div>
+</a>
 
-<div class="sidebox-wrapper">
-<div class="sidebox">
-  <h2>Using a logo instead of icon</h2>
-<p>By default, the system uses your application icon in the action bar, as specified by the <a
-href="{@docRoot}guide/topics/manifest/application-element.html#icon">{@code android:icon}</a>
-attribute in the <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code
-&lt;application&gt;}</a> or <a
-href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
-&lt;activity&gt;}</a> element. However, if you also specify the <a
-href="{@docRoot}guide/topics/manifest/application-element.html#logo">{@code android:logo}</a>
-attribute, then the action bar uses the logo image instead of the icon.</p>
-<p>A logo should usually be wider than the icon, but should not include unnecessary text. You
-should generally use a logo only when it represents your brand in a traditional format that users
-recognize. A good example is the YouTube app's logo&mdash;the logo represents the expected user
-brand, whereas the app's icon is a modified version that conforms to the square requirement.</p>
-</div>
+<div class="figure" style="width:240px">
+  <img src="{@docRoot}images/ui/actionbar-up.png" width="240" alt="" />
+  <p class="img-caption"><strong>Figure 4.</strong> The <em>Up</em> button in Gmail.</p>
 </div>
 
+<p>Enabling the app icon as an <em>Up</em> button allows the user to navigate your app based
+on the hierarchical relationships between screens. For instance, if screen A displays a list of
+items, and selecting an item leads to screen B, then
+screen B should include the <em>Up</em> button, which returns to screen A.</p>
 
-<p>By default, your application icon appears in the action bar on the left side. If you'd like,
-you can enable the icon to behave as an action item. In response to user action on the icon, your
-application should do one of two things:</p>
-
-<ul>
-  <li>Go to the application "home" activity, or</li>
-  <li>Navigate "up" the application's structural hierarchy</li>
-</ul>
-
-<p>When the user touches the icon, the system calls your activity's {@link
-android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} method with the  {@code
-android.R.id.home} ID. In response, you should either start the home activity or
-take the user one step up in your application's structural hierarchy.</p>
-
-<p>If you respond to the application icon by returning to the home activity, you should include
-the {@link android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP} flag in the {@link
-android.content.Intent}. With this flag, if the activity you're starting already exists in the
-current task, then all activities on top of it are destroyed and it is brought to the front.
-Adding this flag is often important because going "home" is an action that's equivalent to "going
-back" and you should usually not create a new instance of the home activity. Otherwise, you
-might end up with a long stack of activities in the current task with multiple instances of the
-home activity.</p>
+<p class="note"><strong>Note:</strong> Up navigation is distinct from the back navigation provided
+by the system <em>Back</em> button. The <em>Back</em> button is used to navigate in reverse
+chronological order through the history of screens the user has recently worked with. It is
+generally based on the temporal relationships between screens, rather than the app's hierarchy
+structure (which is the basis for up navigation).</p>
 
-<p>For example, here's an implementation of {@link android.app.Activity#onOptionsItemSelected
-onOptionsItemSelected()} that returns to the application's "home" activity:</p>
+<p>To enable the app icon as an <em>Up</em> button, call {@link
+android.support.v7.app.ActionBar#setDisplayHomeAsUpEnabled setDisplayHomeAsUpEnabled()}.
+For example:</p>
 
 <pre>
 &#64;Override
-public boolean onOptionsItemSelected(MenuItem item) {
-    switch (item.getItemId()) {
-        case android.R.id.home:
-            // app icon in action bar clicked; go home
-            Intent intent = new Intent(this, HomeActivity.class);
-            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-            startActivity(intent);
-            return true;
-        default:
-            return super.onOptionsItemSelected(item);
-    }
+protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    setContentView(R.layout.activity_details);
+
+    ActionBar actionBar = getSupportActionBar();
+    actionBar.setDisplayHomeAsUpEnabled(true);
+    ...
 }
 </pre>
 
-<p>In case the user can enter the current activity from another application, you might also want to
-add the {@link android.content.Intent#FLAG_ACTIVITY_NEW_TASK} flag. This flag ensures that, when the
-user navigates either "home" or "up", the new activity is <strong>not</strong> added to the current
-task, but instead started in a task that belongs to your application. For example, if the user
-starts an activity in your application through an intent invoked by another application, then
-selects the action bar icon to navigate home or up, the {@link
-android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP} flag starts the activity in a task that belongs to
-your application (not the current task). The system either starts a new task with your new activity
-as the root activity or, if an existing task exists in the background with an instance of that
-activity, then that task is brought forward and the target activity receives {@link
-android.app.Activity#onNewIntent onNewIntent()}. So if your activity accepts intents from other
-applications (it declares any generic intent filters), you should usually add the {@link
-android.content.Intent#FLAG_ACTIVITY_NEW_TASK} flag to the intent:</p>
+<p>Now the icon in the action bar appears with the <em>Up</em> caret (as shown in figure 4).
+However, it won't do anything by default. To specify the activity to open when the
+user presses <em>Up</em> button, you have two options:</p>
 
+<ul>
+  <li><b>Specify the parent activity in the manifest file.</b>
+    <p>This is the best option when <strong>the parent activity is always the same</strong>. By
+declaring in the manifest which activity is the parent, the action bar automatically performs the
+correct action when the user presses the <em>Up</em> button.</p>
+
+    <p>Beginning in Android 4.1 (API level 16), you can declare the parent with the <a href=
+"{@docRoot}guide/topics/manifest/activity-element.html#parent">{@code parentActivityName}</a>
+attribute in the <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
+&lt;activity&gt;}</a> element.</p>
+    <p>To support older devices with the support library, also
+include a <a href="{@docRoot}guide/topics/manifest/meta-data-element.html">{@code
+&lt;meta-data&gt;}</a> element that specifies
+the parent activity as the value for {@code android.support.PARENT_ACTIVITY}. For example:</p>
 <pre>
-intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
+&lt;application ... >
+    ...
+    &lt;!-- The main/home activity (has no parent activity) -->
+    &lt;activity
+        android:name="com.example.myfirstapp.MainActivity" ...>
+        ...
+    &lt;/activity>
+    &lt;!-- A child of the main activity -->
+    &lt;activity
+        android:name="com.example.myfirstapp.DisplayMessageActivity"
+        android:label="&#64;string/title_activity_display_message"
+        android:parentActivityName="com.example.myfirstapp.MainActivity" >
+        &lt;!-- Parent activity meta-data to support API level 7+ -->
+        &lt;meta-data
+            android:name="android.support.PARENT_ACTIVITY"
+            android:value="com.example.myfirstapp.MainActivity" />
+    &lt;/activity>
+&lt;/application>
 </pre>
 
-<p>For more information about these flags and other back stack behaviors, read the <a
-href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back Stack</a>
-developer guide.</p>
-
-<p class="note"><strong>Note:</strong> If you're using the icon to navigate to the home
-activity, beware that beginning with Android 4.0 (API level 14), you must explicitly enable the
-icon as an action item by calling {@link android.app.ActionBar#setHomeButtonEnabled
-setHomeButtonEnabled(true)} (in previous versions, the icon was enabled as an action item by
-default).</p>
-
-
-
-<h3 id="Up">Navigating up</h3>
-
-<div class="figure" style="width:230px;margin-top:-1em">
-  <img src="{@docRoot}images/ui/actionbar-logo.png" alt="" />
-  <p class="img-caption"><strong>Figure 4.</strong> The Email app's standard icon
-(left) and the "navigate up" icon (right). The system automatically adds the "up" indicator.</p>
-</div>
-
-<p>As a supplement to traditional "back" navigation&mdash;which takes the user to the previous
-screen in the task history&mdash;you can enable the action bar icon to offer "up"
-navigation, which should take the user one step up in your application's structural hierarchy. For
-instance, if the current screen is somewhere deep in the hierarchy of the application, touching the
-app icon should navigate upward one level, to the parent of the current screen.</p>
-
-<p>For example, figure 5 illustrates how the BACK button behaves when the user navigates from one
-application to an activity belonging to a different application (specifically, when composing an
-email to a person selected from the People app).</p>
-
-<img src="{@docRoot}images/ui/actionbar-navigate-back.png" alt="" />
-<p class="img-caption"><strong>Figure 5.</strong> The BACK button behavior
-after entering the Email app from the People (or Contacts) app.</p>
-
-<p>However, if the user wants to stay within the email application after composing the email,
-up navigation allows the user to navigate upward in the email application, rather than go back
-to the previous activity. Figure 6 illustrates this scenario, in which the user again comes into
-the email application, but presses the action bar icon to navigate up, rather than back.</p>
-
-<img src="{@docRoot}images/ui/actionbar-navigate-up.png" alt="" />
-<p class="img-caption"><strong>Figure 6.</strong> Example behavior for UP navigation after
-entering the Email app from the People app.</p>
-
-<div class="note design">
-<p><strong>Navigation Design</strong></p>
-  <p>For more about how <em>Up</em> and <em>Back</em> navigation differ, read Android Design's <a
-href="{@docRoot}design/patterns/navigation.html">Navigation</a> guide.</p>
-</div>
+  <p>Once the parent activity is specified in the manifest like this and you enable the <em>Up</em>
+  button with {@link
+android.support.v7.app.ActionBar#setDisplayHomeAsUpEnabled setDisplayHomeAsUpEnabled()}, your work
+is done and the action bar properly navigates up.</p>
+  </li>
 
-<p>To enable the icon for up navigation (which displays the "up" indicator next to the icon), call
-{@link android.app.ActionBar#setDisplayHomeAsUpEnabled setDisplayHomeAsUpEnabled(true)} on your
-{@link android.app.ActionBar}:</p>
 
-<pre>
-protected void onCreate(Bundle savedInstanceState) {
-    super.onCreate(savedInstanceState);
+  <li><strong>Or, override {@link
+android.support.v7.app.ActionBarActivity#getSupportParentActivityIntent()} and {@link
+android.support.v7.app.ActionBarActivity#onCreateSupportNavigateUpTaskStack
+onCreateSupportNavigateUpTaskStack()} in your activity</strong>.</li>
+
+    <p>This is appropriate when <strong>the parent activity may be different</strong> depending
+    on how the user arrived at the current screen. That is, if there are many paths that the user
+    could have taken to reach the current screen, the <em>Up</em> button should navigate
+    backward along the path the user actually followed to get there.</p>
+
+    <p>The system calls {@link
+android.support.v7.app.ActionBarActivity#getSupportParentActivityIntent()} when the user presses
+the <em>Up</em> button while navigating your app (within your app's own task). If the activity that
+should open upon up navigation differs depending on how the user arrived at the current location,
+then you should override this method to return the {@link
+android.content.Intent} that starts the appropriate parent activity.</p>
+
+    <p>The system calls {@link
+android.support.v7.app.ActionBarActivity#onCreateSupportNavigateUpTaskStack
+onCreateSupportNavigateUpTaskStack()} for your activity when the user presses the <em>Up</em>
+button while your activity is running in a task that does <em>not</em> belong to your app. Thus,
+you must use the {@link android.support.v4.app.TaskStackBuilder} passed to this method to construct
+the appropriate back stack that should be synthesized when the user navigates up.</p>
+
+    <p>Even if you override {@link
+android.support.v7.app.ActionBarActivity#getSupportParentActivityIntent()} to specify up navigation
+as the user navigates your app, you can avoid the need to implement {@link
+android.support.v7.app.ActionBarActivity#onCreateSupportNavigateUpTaskStack
+onCreateSupportNavigateUpTaskStack()} by declaring "default" parent activities in the manifest file
+as shown above. Then the default implementation of {@link
+android.support.v7.app.ActionBarActivity#onCreateSupportNavigateUpTaskStack
+onCreateSupportNavigateUpTaskStack()} will synthesize a back stack based on the parent activities
+declared in the manifest.</p>
 
-    setContentView(R.layout.main);
-    ActionBar actionBar = getActionBar();
-    actionBar.setDisplayHomeAsUpEnabled(true);
-    ...
-}
-</pre>
-
-<p>When the user touches the icon, the system calls your activity's {@link
-android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} method with the {@code
-android.R.id.home} ID, as shown in the above section about <a href="#Home">Using the App Icon
-for Navigation</a>.</p>
-
-<p>Remember to use the {@link android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP} flag in the {@link
-android.content.Intent}, so that you don't create a new instance of the parent activity if one
-already exists. For instance, if you don't use the {@link
-android.content.Intent#FLAG_ACTIVITY_CLEAR_TOP} flag, then after navigating up, the BACK button will
-actually take the user "forward", with respect to the application structure, which would be
-strange.</p>
+  </li>
+</ul>
 
-<p class="note"><strong>Note:</strong> If there are many paths that the user could have taken to
-reach the current activity within your application, the up icon should navigate backward along the
-path the user actually followed to get to the current activity.</p>
+<p class="note"><strong>Note:</strong>
+If you've built your app hierarchy using a series of fragments instead of multiple
+activities, then neither of the above options will work. Instead, to navigate up through your
+fragments, override {@link android.support.v7.app.ActionBarActivity#onSupportNavigateUp()}
+to perform the appropriate fragment transaction&mdash;usually by popping
+the current fragment from the back stack by calling {@link
+android.support.v4.app.FragmentManager#popBackStack()}.</p>
 
+<p>For more information about implementing <em>Up</em> navigation, read
+<a href="{@docRoot}training/implementing-navigation/ancestral.html">Providing Up Navigation</a>.</p>
 
 
 
 <h2 id="ActionView">Adding an Action View</h2>
 
-<div class="figure" style="width:300px;margin-top:-1em">
-  <img src="/images/ui/actionbar-searchview.png" alt="" />
-  <p class="img-caption"><strong>Figure 7.</strong> An action bar with a collapsed action
-view for Search (top), then expanded action view with the <code><a
-href="/reference/android/widget/SearchView.html">SearchView</a></code> widget (bottom).</p>
+<div class="figure" style="width:340px">
+<img src="/images/ui/actionbar-searchview@2x.png" alt="" width="340" />
+<p class="img-caption"><strong>Figure 5.</strong> An action bar with a collapsible
+{@link android.support.v7.widget.SearchView}.</p>
 </div>
 
 
-<p>An action view is a widget that appears in the action bar as a substitute for an action item's
-button. For example, if you have an item in the options menu for "Search," you can add an action
-view that replaces the button with a {@link android.widget.SearchView} widget, as shown in figure
-7.</p>
+<p>An <em>action view</em> is a widget that appears in the action bar as a substitute for an action
+button. An action view provides fast access to rich actions without changing activities or
+fragments, and without replacing the action bar. For example, if you have an action for Search, you
+can add an action view to
+embeds a {@link android.support.v7.widget.SearchView} widget in the action bar, as shown in figure
+5.</p>
 
-<p>To declare an action view for an item in your <a
-href="{@docRoot}guide/topics/resources/menu-resource.html">menu resource</a>, use either the {@code
-android:actionLayout} or {@code android:actionViewClass} attribute to specify either a layout
-resource or widget class to use, respectively. For example:</p>
+<p>To declare an action view, use either the {@code
+actionLayout} or {@code actionViewClass} attribute to specify either a layout
+resource or widget class to use, respectively. For example, here's how to add
+the {@link android.support.v7.widget.SearchView} widget:</p>
 
 <pre>
 &lt;?xml version="1.0" encoding="utf-8"?>
-&lt;menu xmlns:android="http://schemas.android.com/apk/res/android">
-    &lt;item android:id="@+id/menu_search"
-          android:title="@string/menu_search"
-          android:icon="@drawable/ic_menu_search"
-          android:showAsAction="ifRoom|collapseActionView"
-          <b>android:actionViewClass="android.widget.SearchView"</b> /&gt;
+&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
+      xmlns:example.app="http://schemas.android.com/apk/res-auto" >
+    &lt;item android:id="@+id/action_search"
+          android:title="@string/action_search"
+          android:icon="@drawable/ic_action_search"
+          example.app:showAsAction="ifRoom|collapseActionView"
+          <b>example.app:actionViewClass="android.support.v7.widget.SearchView"</b> /&gt;
 &lt;/menu>
 </pre>
 
-<p>Notice that the {@code android:showAsAction} attribute also includes {@code
-"collapseActionView"}. This is optional and declares that the action view should be collapsed into a
-button. When the user selects the button, the action view expands. Otherwise, the action view is
-visible by default and might consume valuable action bar space even when the user is not using it.
-For more information, see the next section about <a href="#ActionViewCollapsing">Handling
-collapsible action views</a>.</p>
+<p>Notice that the {@code showAsAction} attribute also includes the {@code "collapseActionView"}
+value. This is optional and declares that the action view should be collapsed into a
+button. (This behavior is explained further in the following section about
+<a href="#ActionViewCollapsing">Handling collapsible action views</a>.)</p>
+
+<p>If you need to configure the action view (such as to add event listeners), you can do so during
+the {@link android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} callback. You can
+acquire the action view object by calling the static method {@link
+android.support.v4.view.MenuItemCompat#getActionView MenuItemCompat.getActionView()} and passing it
+the corresponding {@link android.view.MenuItem}. For example, the search widget from the above
+sample is acquired like this:</p>
 
-<p>If you need to add some event hooks to your action view, you can do so during the {@link
-android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} callback. You can acquire elements
-in an action view by calling {@link android.view.Menu#findItem findItem()} with the ID of the menu
-item, then call {@link android.view.MenuItem#getActionView}. For
-example, the search widget from the above sample is acquired like this:</p>
 
 <pre>
 &#64;Override
 public boolean onCreateOptionsMenu(Menu menu) {
-    getMenuInflater().inflate(R.menu.options, menu);
-    SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
+    getMenuInflater().inflate(R.menu.main_activity_actions, menu);
+    MenuItem searchItem = menu.findItem(R.id.action_search);
+    SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
     // Configure the search info and add any event listeners
     ...
     return super.onCreateOptionsMenu(menu);
 }
 </pre>
 
+<div class="note">
+<p><b>On API level 11 or higher</b></p>
+<p>Get the action view by calling {@link android.view.MenuItem#getActionView} on the
+corresponding {@link android.view.MenuItem}:</p>
+<pre>menu.findItem(R.id.action_search).getActionView()</pre>
+</div>
+
 <p>For more information about using the search widget, see <a
 href="{@docRoot}guide/topics/search/search-dialog.html">Creating a Search Interface</a>.</p>
 
 
-<h3 id="ActionViewCollapsing">Handling collapsible action views</h3>
-
-<div class="sidebox-wrapper">
-<div class="sidebox">
-  <h3>Supporting Android 3.0 with an action view</h3>
-  <p>The {@code "collapseActionView"} option was added with Android 4.0 (API level 14). However, if
-your application supports older versions, you should
-still declare {@code "collapseActionView"} in order to better support smaller screens.
-Devices running Android 4.0 and higher will show the action view collapsed, while older versions
-work as designed otherwise.</p>
-  <p>Adding this value requires that you set your build target to Android 4.0 or higher in order to
-compile. Older versions of Android ignore the {@code "collapseActionView"} value because they don't
-understand it. Just be sure not to use other APIs in your source code that are not supported in the
-version declared by your <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
-minSdkVersion}</a>, unless you add the appropriate version check at runtime.</p>
-</div>
-</div>
 
+<h3 id="ActionViewCollapsing">Handling collapsible action views</h3>
 
-<p>Action views allow you to provide fast access to rich actions without changing activities or
-fragments, or replacing the action bar. However, it might not be appropriate to make an action view
-visible by default. To preserve the action bar space (especially when running on smaller screens),
-you can collapse your action view into an action item button. When the user selects the
-button, the action view appears in the action bar. When collapsed, the system might place the item
-into the overflow menu if you've defined {@code android:showAsAction} with {@code "ifRoom"}, but the
-action view still appears in the action bar when the user selects the item. You can make your action
-view collapsible by adding {@code "collapseActionView"} to the {@code android:showAsAction}
+<p>To preserve the action bar space, you can collapse your action view into an action button.
+When collapsed, the system might place the action
+into the action overflow, but the
+action view still appears in the action bar when the user selects it. You can make your action
+view collapsible by adding {@code "collapseActionView"} to the {@code showAsAction}
 attribute, as shown in the XML above.</p>
 
-<p>Because the system will expand the action view when the user selects the item, you
+<p>Because the system expands the action view when the user selects the action, you
 <em>do not</em> need to respond to the item in the {@link
-android.app.Activity#onOptionsItemSelected onOptionsItemSelected} callback. The system still calls
-{@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} when the user selects it,
-but the system will always expand the action view unless you return {@code true} (indicating
-you've handled the event instead).</p>
-
-<p>The system also collapses your action view when the user selects the "up" icon in the action
-bar or presses the BACK button.</p>
-
-<p>If necessary, you can expand or collapse the action view in your own code by calling {@link
-android.view.MenuItem#expandActionView()} and {@link android.view.MenuItem#collapseActionView()} on
-the {@link android.view.MenuItem}.</p>
-
-<p class="note"><strong>Note:</strong> Although collapsing your action view is optional, we
-recommend that you always collapse your action view if it includes {@link
-android.widget.SearchView}. Also be aware that some devices provide a dedicated SEARCH button and
-you should expand your search action view if the user presses the SEARCH button. Simply override 
-your activity's {@link android.app.Activity#onKeyUp onKeyUp()} callback method, listen for the
-{@link android.view.KeyEvent#KEYCODE_SEARCH} event, then call {@link
-android.view.MenuItem#expandActionView()}.</p>
+android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} callback. The system still calls
+{@link android.app.Activity#onOptionsItemSelected onOptionsItemSelected()}, but if
+you return {@code true} (indicating you've handled the event instead), then the
+action view will <em>not</em> expand.</p>
+
+<p>The system also collapses your action view when the user presses the <em>Up</em> button
+or <em>Back</em> button.</p>
 
 <p>If you need to update your activity based on the visibility of your action view, you can receive
-callbacks when it's expanded and collapsed by defining an {@link
-android.view.MenuItem.OnActionExpandListener OnActionExpandListener} and registering it with {@link
-android.view.MenuItem#setOnActionExpandListener setOnActionExpandListener()}. For example:</p>
+callbacks when the action is expanded and collapsed by defining an {@link
+android.support.v4.view.MenuItemCompat.OnActionExpandListener OnActionExpandListener} and
+passing it to {@link android.support.v4.view.MenuItemCompat#setOnActionExpandListener
+setOnActionExpandListener()}. For example:</p>
+
 
 <pre>
 &#64;Override
@@ -708,7 +651,9 @@ public boolean onCreateOptionsMenu(Menu menu) {
     MenuItem menuItem = menu.findItem(R.id.actionItem);
     ...
 
-    menuItem.setOnActionExpandListener(new OnActionExpandListener() {
+    // When using the support library, the setOnActionExpandListener() method is
+    // static and accepts the MenuItem object as an argument
+    MenuItemCompat.setOnActionExpandListener(menuItem, new OnActionExpandListener() {
         &#64;Override
         public boolean onMenuItemActionCollapse(MenuItem item) {
             // Do something when collapsed
@@ -729,165 +674,169 @@ public boolean onCreateOptionsMenu(Menu menu) {
 
 <h2 id="ActionProvider">Adding an Action Provider</h2>
 
-<div class="figure" style="width:200px">
-  <img src="{@docRoot}images/ui/actionbar-shareaction.png" alt="" />
-  <p class="img-caption"><strong>Figure 8.</strong> Screenshot from the Gallery app, with the
-  {@link android.widget.ShareActionProvider} submenu expanded to show share targets.</p>
+<div class="figure" style="width:240px">
+  <img src="{@docRoot}images/ui/actionbar-shareaction@2x.png" alt="" width="240" />
+  <p class="img-caption"><strong>Figure 6.</strong> An action bar with
+  {@link android.widget.ShareActionProvider} expanded to show share targets.</p>
 </div>
 
-<p>Similar to an <a href="#ActionView">action view</a>, an action provider (defined by the {@link
-android.view.ActionProvider} class) replaces an action item with a customized layout, but it also
-takes control of all the item's behaviors. When you declare an action provider for a menu
-item in the action bar, it not only controls the appearance of the item in the action bar with a
-custom layout, but also handles the default event for the menu item when it appears in the overflow
-menu. It can also provide a submenu from either the action bar or the overflow menu.</p>
-
-<p>For example, the {@link android.widget.ShareActionProvider} is an extension of {@link
-android.view.ActionProvider} that facilitates a “share" action by showing a list of available share
-targets from the action bar. Instead of using a
-traditional action item that invokes the {@link android.content.Intent#ACTION_SEND} intent, you can
-declare an instance of {@link android.widget.ShareActionProvider} to handle an action item. This
-action provider presents an action view with a drop-down list of applications that handle
-the {@link android.content.Intent#ACTION_SEND} intent, even when the menu item appears in the
-overflow menu. Hence, when you use an action provider such as this one, you don't
-have to handle user events on the menu item.</p>
-
-<p>To declare an action provider for an action item, define the {@code android:actionProviderClass}
-attribute for the appropriate the {@code &lt;item&gt;} element in your <a
-href="{@docRoot}guide/topics/resources/menu-resource.html">menu resource</a>, using the
-fully-qualified class name of the action provider. For example:</p>
+<p>Similar to an <a href="#ActionView">action view</a>, an <em>action provider</em>
+replaces an action button with a customized layout. However,
+unlike an action view, an action provider takes control of all the action's behaviors
+and an action provider can display a submenu when pressed.</p>
 
-<pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;menu xmlns:android="http://schemas.android.com/apk/res/android">
-    &lt;item android:id="@+id/menu_share"
-          android:title="@string/share"
-          android:showAsAction="ifRoom"
-          <strong>android:actionProviderClass="android.widget.ShareActionProvider"</strong> /&gt;
-    ...
-&lt;/menu>
-</pre>
+<p>To declare an action provider, supply the {@code actionViewClass} attribute in the
+menu {@code &lt;item>} tag with a fully-qualified class name for an
+{@link android.support.v4.view.ActionProvider}.</p>
 
-<p>In this example, the {@link android.widget.ShareActionProvider} is used as the action provider.
-At this point, the action provider officially takes control of the menu item and handles both
-its appearance and behavior in the action bar and its behavior in the overflow menu. You must
-still provide a text title for the item to be used in the overflow menu.</p>
+<p>You can build your own action provider by extending the {@link
+android.support.v4.view.ActionProvider} class, but Android provides some pre-built action providers
+such as {@link android.support.v7.widget.ShareActionProvider}, which facilitates a "share" action
+by showing a list of possible apps for sharing directly in the action bar (as shown in figure
+6).</p>
 
-<p>Although the action provider can perform the default action for the menu item when it appears in
-the overflow menu, your activity (or fragment) can override that behavior by
-also handling the click event from the {@link android.app.Activity#onOptionsItemSelected
-onOptionsItemSelected()} callback method. If you do not handle the event in that callback, then
-the action provider receives the {@link android.view.ActionProvider#onPerformDefaultAction()}
-callback to handle the event. However, if the action provider provides a submenu, then your
-activity will not receive the {@link android.app.Activity#onOptionsItemSelected
-onOptionsItemSelected()} callback, because the submenu is shown instead of invoking the default
-menu item behavior when selected.</p>
+<p>Because each {@link android.support.v4.view.ActionProvider} class defines its own action
+behaviors, you don't need to listen for the action in the {@link
+android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} method. If necessary though,
+you can still listen for the click event in the {@link android.app.Activity#onOptionsItemSelected
+onOptionsItemSelected()} method in case you need to simultaneously perform another action. But be
+sure to return {@code false} so that the the action provider still receives the {@link
+android.support.v4.view.ActionProvider#onPerformDefaultAction()} callback to perform its intended
+action.</p>
+
+
+<p>However, if the action provider provides a submenu of actions, then your
+activity does not receive a call to {@link android.app.Activity#onOptionsItemSelected
+onOptionsItemSelected()} when the user opens the list or selects one of the submenu items.</p>
 
 
 
 <h3 id="ShareActionProvider">Using the ShareActionProvider</h3>
 
-<p>If you want to provide a "share" action in your action bar by leveraging other applications
-installed on the device (for example, to share a photo using a messaging or social app), then using
-{@link android.widget.ShareActionProvider} is an effective way to do so, rather than adding an
-action item that invokes the {@link android.content.Intent#ACTION_SEND} intent. When
-you use {@link android.widget.ShareActionProvider} for an action item, it presents an action view
-with a drop-down list of applications that handle the {@link android.content.Intent#ACTION_SEND}
-intent (as shown in figure 8).</p>
+<p>To add a "share" action with {@link android.support.v7.widget.ShareActionProvider},
+define the {@code actionProviderClass} for an {@code &lt;item&gt;} tag with
+the {@link android.support.v7.widget.ShareActionProvider} class. For example:</p>
 
-<p>All the logic for creating the submenu, populating it with share targets, and handling click
-events (including when the item appears in the overflow menu) is implemented by the {@link
-android.widget.ShareActionProvider}&mdash;the only code you need to write is to declare the action
-provider for the menu item and specify the share intent.</p>
+<pre>
+&lt;?xml version="1.0" encoding="utf-8"?>
+&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
+      xmlns:example.app="http://schemas.android.com/apk/res-auto" >
+    &lt;item android:id="@+id/action_share"
+          android:title="@string/share"
+          example.app:showAsAction="ifRoom"
+          <strong>example.app:actionProviderClass="android.support.v7.widget.ShareActionProvider"</strong>
+          /&gt;
+    ...
+&lt;/menu>
+</pre>
 
-<p>By default, the {@link android.widget.ShareActionProvider} retains a ranking for each
-share target based on how often the user selects each one. The share targets used more frequently
-appear at the top of the drop-down list and the target used most often appears directly in the
-action bar as the default share target. By default, the ranking information is
-saved in a private file with a name specified by {@link
-android.widget.ShareActionProvider#DEFAULT_SHARE_HISTORY_FILE_NAME}. If you use the {@link
-android.widget.ShareActionProvider} or an extension of it for only one type of action, then you
-should continue to use this default history file and there's nothing you need to do. However, if you
-use {@link android.widget.ShareActionProvider} or an extension of it for multiple actions with
-semantically different meanings, then each {@link android.widget.ShareActionProvider} should specify
-its own history file in order to maintain its own history. To specify a
-different history file for the {@link android.widget.ShareActionProvider}, call {@link
-android.widget.ShareActionProvider#setShareHistoryFileName setShareHistoryFileName()} and provide
-an XML file name (for example, {@code "custom_share_history.xml"}).</p>
-
-<p class="note"><strong>Note:</strong> Although the {@link android.widget.ShareActionProvider} ranks
-share targets based on frequency of use, the behavior is extensible and extensions of {@link
-android.widget.ShareActionProvider} can perform different behaviors and ranking based on the history
-file (if appropriate).</p>
-
-<p>To add {@link android.widget.ShareActionProvider}, simply define the {@code
-android:actionProviderClass} attribute with {@code "android.widget.ShareActionProvider"}, as shown
-in the XML example above. The only thing left to do is define
-the {@link android.content.Intent} you want to use for sharing. To do so, you must call {@link
-android.view.MenuItem#getActionProvider} to retrieve the {@link android.widget.ShareActionProvider}
-that's associated with a {@link android.view.MenuItem}, then call {@link
-android.widget.ShareActionProvider#setShareIntent setShareIntent()}.</p>
-
-<p>If the format for the share intent depends on the selected item or other variables that change
-during the activity lifecycle, you should save the {@link android.widget.ShareActionProvider} in a
-member field and update it by calling {@link android.widget.ShareActionProvider#setShareIntent
-setShareIntent()} as necessary. For example:</p>
+<p>Now the action provider takes control of the action item and handles both
+its appearance and behavior. But you must
+still provide a title for the item to be used when it appears in the action overflow.</p>
+
+<p>The only thing left to do is define
+the {@link android.content.Intent} you want to use for sharing. To do so, edit
+your {@link
+android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} method to call {@link
+android.support.v4.view.MenuItemCompat#getActionProvider MenuItemCompat.getActionProvider()}
+and pass it the {@link android.view.MenuItem} holding the action provider. Then call {@link
+android.support.v7.widget.ShareActionProvider#setShareIntent setShareIntent()} on the
+returned {@link android.support.v7.widget.ShareActionProvider} and pass it an
+{@link android.content.Intent#ACTION_SEND} intent with the appropriate content attached.</p>
+
+<p>You should call {@link
+android.support.v7.widget.ShareActionProvider#setShareIntent setShareIntent()} once during {@link
+android.app.Activity#onCreateOptionsMenu onCreateOptionsMenu()} to initialize the share action,
+but because the user context might change, you must update the intent any time the shareable
+content changes by again calling {@link
+android.support.v7.widget.ShareActionProvider#setShareIntent setShareIntent()}.</p>
+
+<p>For example:</p>
 
 <pre>
 private ShareActionProvider mShareActionProvider;
-...
 
 &#64;Override
 public boolean onCreateOptionsMenu(Menu menu) {
-    mShareActionProvider = (ShareActionProvider) menu.findItem(R.id.menu_share).getActionProvider();
+    getMenuInflater().inflate(R.menu.main_activity_actions, menu);
 
-    // If you use more than one ShareActionProvider, each for a different action,
-    // use the following line to specify a unique history file for each one.
-    // mShareActionProvider.setShareHistoryFileName("custom_share_history.xml");
+    // Set up ShareActionProvider's default share intent
+    MenuItem shareItem = menu.findItem(R.id.action_share);
+    mShareActionProvider = (ShareActionProvider)
+            MenuItemCompat.getActionProvider(shareItem);
+    mShareActionProvider.setShareIntent(getDefaultIntent());
 
-    // Set the default share intent
-    mShareActionProvider.setShareIntent(getDefaultShareIntent());
+    return super.onCreateOptionsMenu(menu);
+}
 
-    return true;
+/** Defines a default (dummy) share intent to initialize the action provider.
+  * However, as soon as the actual content to be used in the intent
+  * is known or changes, you must update the share intent by again calling
+  * mShareActionProvider.{@link
+  * android.support.v7.widget.ShareActionProvider#setShareIntent setShareIntent()}
+  */
+private Intent getDefaultIntent() {
+    Intent intent = new Intent(Intent.ACTION_SEND);
+    intent.setType("image/*");
+    return intent;
 }
-// When you need to update the share intent somewhere else in the app, call
-// mShareActionProvider.{@link android.widget.ShareActionProvider#setShareIntent setShareIntent()}
 </pre>
 
-<p>The {@link android.widget.ShareActionProvider} now handles all user interaction with the item and
-you <em>do not</em> need to handle click events from the {@link
+<p>The {@link android.support.v7.widget.ShareActionProvider} now handles all user interaction with
+the item and you <em>do not</em> need to handle click events from the {@link
 android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} callback method.</p>
 
-<p>For a sample using the share action provider, see
-<a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/ActionBarShareActionProviderActivity.html"
->ActionBarShareActionProviderActivity</a>.
+
+<p>By default, the {@link android.support.v7.widget.ShareActionProvider} retains a ranking for each
+share target based on how often the user selects each one. The share targets used more frequently
+appear at the top of the drop-down list and the target used most often appears directly in the
+action bar as the default share target. By default, the ranking information is saved in a private
+file with a name specified by {@link
+android.support.v7.widget.ShareActionProvider#DEFAULT_SHARE_HISTORY_FILE_NAME}. If you use the
+{@link android.support.v7.widget.ShareActionProvider} or an extension of it for only one type of
+action, then you should continue to use this default history file and there's nothing you need to
+do. However, if you use {@link android.support.v7.widget.ShareActionProvider} or an extension of it
+for multiple actions with semantically different meanings, then each {@link
+android.support.v7.widget.ShareActionProvider} should specify its own history file in order to
+maintain its own history. To specify a different history file for the {@link
+android.support.v7.widget.ShareActionProvider}, call {@link
+android.support.v7.widget.ShareActionProvider#setShareHistoryFileName setShareHistoryFileName()}
+and provide an XML file name (for example, {@code "custom_share_history.xml"}).</p>
+
+
+<p class="note"><strong>Note:</strong> Although the {@link
+android.support.v7.widget.ShareActionProvider} ranks share targets based on frequency of use, the
+behavior is extensible and extensions of {@link android.support.v7.widget.ShareActionProvider} can
+perform different behaviors and ranking based on the history file (if appropriate).</p>
+
 
 
 
 <h3 id="CreatingActionProvider">Creating a custom action provider</h3>
 
-<p>When you want to create an action view that has dynamic behaviors and a default action in the
-overflow menu, extending {@link android.view.ActionProvider} to define those behaviors is a good
-solution. Creating your own action provider offers you an organized and reusable component, rather
-than handling the various action item transformations and behaviors in your fragment or activity
-code. As shown in the previous section, Android provides one implementation of {@link
-android.view.ActionProvider} for share actions: the {@link android.widget.ShareActionProvider}.</p>
+<p>Creating your own action provider allows you to re-use and manage dynamic action item
+behaviors in a self-contained module, rather than handle action item transformations and
+behaviors in your fragment or activity
+code. As shown in the previous section, Android already provides an implementation of {@link
+android.support.v4.view.ActionProvider} for share actions: the {@link
+android.support.v7.widget.ShareActionProvider}.</p>
 
-<p>To create your own, simply extend the {@link android.view.ActionProvider} class and implement
+<p>To create your own action provider for a different action, simply extend the
+{@link android.support.v4.view.ActionProvider} class and implement
 its callback methods as appropriate. Most importantly, you should implement the following:</p>
 
 <dl>
-  <dt>{@link android.view.ActionProvider#ActionProvider ActionProvider()}</dt>
+  <dt>{@link android.support.v4.view.ActionProvider#ActionProvider ActionProvider()}</dt>
   <dd>This constructor passes you the application {@link android.content.Context}, which you
 should save in a member field to use in the other callback methods.</dd>
 
-  <dt>{@link android.view.ActionProvider#onCreateActionView()}</dt>
+  <dt>{@link android.support.v4.view.ActionProvider#onCreateActionView(MenuItem)}</dt>
   <dd>This is where you define the action view for the item. Use the {@link
 android.content.Context} acquired from the constructor to instantiate a {@link
 android.view.LayoutInflater} and inflate your action view layout from an XML resource, then hook
 up event listeners. For example:
 <pre>
-public View onCreateActionView() {
+public View onCreateActionView(MenuItem forItem) {
     // Inflate the action view to be shown on the action bar.
     LayoutInflater layoutInflater = LayoutInflater.from(mContext);
     View view = layoutInflater.inflate(R.layout.action_provider, null);
@@ -903,18 +852,21 @@ public View onCreateActionView() {
 </pre>
 </dd>
 
-  <dt>{@link android.view.ActionProvider#onPerformDefaultAction()}</dt>
-  <dd>The system calls this when the menu item is selected from the overflow menu and the
+  <dt>{@link android.support.v4.view.ActionProvider#onPerformDefaultAction()}</dt>
+  <dd>The system calls this when the menu item is selected from the action overflow and the
 action provider should perform a default action for the menu item.
   <p>However, if your action provider provides a submenu, through the {@link
-android.view.ActionProvider#onPrepareSubMenu onPrepareSubMenu()} callback, then the submenu
-appears even when the menu item is in the overflow menu. Thus, {@link
-android.view.ActionProvider#onPerformDefaultAction()} is never called when there is a
+android.support.v4.view.ActionProvider#onPrepareSubMenu onPrepareSubMenu()} callback, then the
+submenu appears even when the action provider is placed in the action overflow. Thus, {@link
+android.support.v4.view.ActionProvider#onPerformDefaultAction()} is never called when there is a
 submenu.</p>
+
   <p class="note"><strong>Note:</strong> An activity or a fragment that implements {@link
 android.app.Activity#onOptionsItemSelected onOptionsItemSelected()} can override the action
-provider's default behavior by handling the item-selected event (and returning true), in which
-case, the system does not call {@link android.view.ActionProvider#onPerformDefaultAction()}.</p>
+provider's default behavior (unless it uses a submenu) by handling the item-selected event (and
+returning <code>true</code>), in which case, the system does not call {@link
+android.support.v4.view.ActionProvider#onPerformDefaultAction()}.</p>
+
 </dd>
 </dl>
 
@@ -927,62 +879,68 @@ href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/Acti
 
 <h2 id="Tabs">Adding Navigation Tabs</h2>
 
+<img src="{@docRoot}images/ui/actionbar-tabs@2x.png" width="760" alt="" />
+<p class="img-caption"><strong>Figure 7.</strong> Action bar tabs on a wide screen.</p>
 
-<div class="figure" style="width:450px">
-  <img src="{@docRoot}images/ui/actionbar.png" alt="" />
-  <p class="img-caption"><strong>Figure 9.</strong> Screenshot of action bar tabs from the <a
-href="{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> app.</p>
-</div>
+<a class="notice-designers" href="{@docRoot}design/building-blocks/tabs.html">
+  <div>
+    <h3>Design Guide</h3>
+    <p>Tabs</p>
+  </div>
+</a>
+
+<a class="notice-developers" href="{@docRoot}training/implementing-navigation/lateral.html">
+  <div>
+    <h3>Also read</h3>
+    <p>Creating Swipe Views with Tabs</p>
+  </div>
+</a>
 
-<div class="figure" style="width:250px">
-  <img src="{@docRoot}images/ui/actionbar-stacked.png" alt="" />
-  <p class="img-caption"><strong>Figure 10.</strong> Screenshot of tabs in the stacked action
-bar on a narrow screen.</p>
+
+<div class="figure" style="width:240px">
+  <img src="{@docRoot}images/ui/actionbar-tabs-stacked@2x.png" width="240" alt="" />
+  <p class="img-caption"><strong>Figure 8.</strong> Tabs on a narrow screen.</p>
 </div>
 
-<p>When you want to provide navigation tabs in an activity, using the action bar's
-tabs is a great option (instead of using {@link android.widget.TabWidget}), because the
-system adapts the action bar tabs for different screen sizes&mdash;placing them in the main action
-bar when the screen is sufficiently wide, or in a separate bar (known as the "stacked action bar")
-when the screen is too narrow, as shown in figures 9 and 10.</p>
-
-<p>To switch between fragments using the tabs, you must perform a fragment
-transaction each time a tab is selected. If you're not familiar with how to change fragments
-using {@link android.app.FragmentTransaction}, first read the <a
-href="{@docRoot}guide/components/fragments.html">Fragments</a> developer guide.</p>
-
-<p>To get started, your layout must include a {@link android.view.ViewGroup} in which you place each
-{@link android.app.Fragment} associated with a tab. Be sure the {@link android.view.ViewGroup} has a
-resource ID so you can reference it from your tab-swapping code. Alternatively, if the tab content
-will fill the activity layout (excluding the action bar), then your activity doesn't need a layout
-at all (you don't even need to call {@link android.app.Activity#setContentView
-setContentView()}). Instead, you can place each fragment in the default root {@link
-android.view.ViewGroup}, which you can refer to with the {@code android.R.id.content} ID (you can
-see this ID used in the sample code below, during fragment transactions).</p>
+<p>Tabs in the action bar make it easy for users to explore and switch between different views in
+your app. The tabs provided by the {@link android.support.v7.app.ActionBar} are ideal because they
+adapt to different screen sizes. For example, when the screen is wide enough the tabs appear in the
+action bar alongside the action buttons (such as when on a tablet, shown in figure 7), while when
+on a narrow screen they appear in a separate bar (known as the "stacked action bar", shown in
+figure 8). In some cases, the Android system will instead show your tab items as a drop-down list
+to ensure the best fit in the action bar.</p>
+
+<p>To get started, your layout must include a {@link android.view.ViewGroup} in which you place
+each {@link android.app.Fragment} associated with a tab. Be sure the {@link android.view.ViewGroup}
+has a resource ID so you can reference it from your code and swap the tabs within it.
+Alternatively, if the tab content will fill the activity layout, then your activity doesn't need a
+layout at all (you don't even need to call {@link android.app.Activity#setContentView
+setContentView()}). Instead, you can place each fragment in the default root view, which you can
+refer to with the {@code android.R.id.content} ID.</p>
+
 
 <p>Once you determine where the fragments appear in the layout, the basic procedure to add tabs
 is:</p>
 <ol>
-  <li>Implement the {@link android.app.ActionBar.TabListener} interface. Callbacks in this
-interface respond to user events on the tabs so you can swap fragments.</li>
-  <li>For each tab you want to add, instantiate an {@link android.app.ActionBar.Tab} and set the
-{@link android.app.ActionBar.TabListener} by calling {@link android.app.ActionBar.Tab#setTabListener
-setTabListener()}. Also set the tab's title and/or icon with {@link
-android.app.ActionBar.Tab#setText setText()} and/or {@link android.app.ActionBar.Tab#setIcon
-setIcon()}.</li>
-  <li>Add each tab to the action bar by calling {@link android.app.ActionBar#addTab addTab()}.</li>
+  <li>Implement the {@link android.support.v7.app.ActionBar.TabListener} interface. This interface
+  provides callbacks for tab events, such as when the user presses one so you can swap the
+  tabs.</li>
+  <li>For each tab you want to add, instantiate an {@link android.support.v7.app.ActionBar.Tab}
+  and set the {@link android.support.v7.app.ActionBar.TabListener} by calling {@link
+  android.support.v7.app.ActionBar.Tab#setTabListener setTabListener()}. Also set the tab's title
+  and with {@link android.app.ActionBar.Tab#setText setText()} (and optionally, an icon with
+  {@link android.app.ActionBar.Tab#setIcon setIcon()}).</li>
+  <li>Then add each tab to the action bar by calling {@link android.support.v7.app.ActionBar#addTab
+  addTab()}.</li>
 </ol>
 
-<p>When looking at the {@link android.app.ActionBar.TabListener} interface, notice that the
-callback methods provide only the {@link android.app.ActionBar.Tab} that was selected and a {@link
-android.app.FragmentTransaction} for you to perform fragment transactions&mdash;it doesn't say
-anything about what fragment you should swap in or out. Thus, you must define your own association
+<p>Notice that the {@link android.support.v7.app.ActionBar.TabListener}
+callback methods don't specify which fragment is associated with the tab, but merely which
+{@link android.support.v7.app.ActionBar.Tab} was selected.
+You must define your own association
 between each {@link android.app.ActionBar.Tab} and the appropriate {@link android.app.Fragment} that
-it represents (in order to perform the appropriate fragment transaction). There are several ways you
-can define the association, depending on your design. In the example below, the {@link
-android.app.ActionBar.TabListener} implementation provides a constructor such that each new tab uses
-its own instance of the listener. Each instance of the listener defines several fields that are
-necessary to later perform a transaction on the appropriate fragment.</p>
+it represents. There are several ways you
+can define the association, depending on your design.</p>
 
 <p>For example, here's how you might implement the {@link android.app.ActionBar.TabListener}
 such that each tab uses its own instance of the listener:</p>
@@ -1042,13 +1000,10 @@ adds ({@link android.app.FragmentTransaction#add add()}) it to the layout (as a
 android.R.id.content} view group)&mdash;when the respective tab is selected, and detaches ({@link
 android.app.FragmentTransaction#detach detach()}) it when the tab is unselected.</p>
 
-<p>The {@link android.app.ActionBar.TabListener} implementation is the bulk of the work. All that
-remains is to create each {@link android.app.ActionBar.Tab} and add it to the {@link
+<p>All that remains is to create each {@link android.app.ActionBar.Tab} and add it to the {@link
 android.app.ActionBar}. Additionally, you must call {@link
 android.app.ActionBar#setNavigationMode(int) setNavigationMode(NAVIGATION_MODE_TABS)} to make the
-tabs visible. You might also want to disable the activity title by calling {@link
-android.app.ActionBar#setDisplayShowTitleEnabled setDisplayShowTitleEnabled(false)} if the tab
-titles actually indicate the current view.</p>
+tabs visible.</p>
 
 <p>For example, the following code adds two tabs using the listener defined above:</p>
 
@@ -1060,62 +1015,70 @@ protected void onCreate(Bundle savedInstanceState) {
     // android.R.id.content as the container for each fragment
 
     // setup action bar for tabs
-    ActionBar actionBar = getActionBar();
+    ActionBar actionBar = getSupportActionBar();
     actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
     actionBar.setDisplayShowTitleEnabled(false);
 
     Tab tab = actionBar.newTab()
-            .setText(R.string.artist)
-            .setTabListener(new TabListener&lt;ArtistFragment>(
-                    this, "artist", ArtistFragment.class));
+                       .setText(R.string.artist)
+                       .setTabListener(new TabListener&lt;ArtistFragment>(
+                               this, "artist", ArtistFragment.class));
     actionBar.addTab(tab);
 
     tab = actionBar.newTab()
-        .setText(R.string.album)
-        .setTabListener(new TabListener&lt;AlbumFragment>(
-                this, "album", AlbumFragment.class));
+                   .setText(R.string.album)
+                   .setTabListener(new TabListener&lt;AlbumFragment>(
+                           this, "album", AlbumFragment.class));
     actionBar.addTab(tab);
 }
 </pre>
 
-<p class="note"><strong>Note:</strong> The above implementation for {@link
-android.app.ActionBar.TabListener} is one of several possible techniques. You can see more of
-this style in the <a
-href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/FragmentTabs.html"
->API Demos</a> app.</p>
 
+<p>If your activity stops, you should retain the currently selected tab with the <a href=
+"{@docRoot}guide/components/activities.html#SavingActivityState">saved instance state</a> so you
+can open the appropriate tab when the user returns. When it's time to save the state, you can query
+the currently selected tab with {@link
+android.support.v7.app.ActionBar#getSelectedNavigationIndex()}. This returns the index position of
+the selected tab.</p>
 
-<p>If your activity stops, you should retain the currently selected tab with the <a
-href="{@docRoot}guide/components/activities.html#SavingActivityState">saved instance
-state</a> so you can open the appropriate tab when the user returns. When it's time to save the
-state, you can query the currently selected tab with {@link
-android.app.ActionBar#getSelectedNavigationIndex()}. This returns the index position of the selected
-tab.</p>
 
 <p class="caution"><strong>Caution:</strong> It's important that you save the state of each fragment
-as necessary, so that when users switch fragments with the tabs and then return to a previous
-fragment, it looks the way it did when they left. For information about saving the state of your
+so when users switch fragments with the tabs and then return to a previous
+fragment, it looks the way it did when they left. Some of the state is saved by default, but you
+may need to manually save state for customized views. For information about saving the state of your
 fragment, see the <a href="{@docRoot}guide/components/fragments.html">Fragments</a>
-developer guide.</p>
+API guide.</p>
+
+<p class="note"><strong>Note:</strong> The above implementation for {@link
+android.support.v7.app.ActionBar.TabListener} is one of several possible techniques. Another popular
+option is to use {@link android.support.v4.view.ViewPager} to manage the fragments so users
+can also use a swipe gesture to switch tabs. In this case, you simply tell the
+{@link android.support.v4.view.ViewPager} the current tab position in the
+{@link android.support.v7.app.ActionBar.TabListener#onTabSelected onTabSelected()} callback.
+For more information, read
+<a href="{@docRoot}training/implementing-navigation/lateral.html"
+>Creating Swipe Views with Tabs</a>.</p>
 
 
-<p class="note"><strong>Note:</strong> In some cases, the Android system will show your action
-bar tabs as a drop-down list in order to ensure the best fit in the action bar.</p>
 
 
-<h2 id="Dropdown">Adding Drop-down Navigation</h2>
 
-<p>As another mode of navigation (or filtering) within your activity, the action bar offers a
-built in drop-down list. For example, the drop-down list can offer different modes by which content
-in the activity is sorted.</p>
+<h2 id="Dropdown">Adding Drop-down Navigation</h2>
 
-<!--
-<div class="figure" style="width:135px">
-  <img src="{@docRoot}images/ui/actionbar-dropdown.png" alt="" />
-  <p class="img-caption"><strong>Figure 5.</strong> Screenshot of a drop-down navigation list in the
+<div class="figure" style="width:240px">
+  <img src="{@docRoot}images/ui/actionbar-dropdown@2x.png" alt="" width="240" />
+  <p class="img-caption"><strong>Figure 9.</strong> A drop-down navigation list in the
 action bar.</p>
 </div>
--->
+
+<p>As another mode of navigation (or filtering) for your activity, the action bar offers a built
+in drop-down list (also known as a "spinner"). For example, the drop-down list can offer different
+modes by which content in the activity is sorted.</p>
+
+<p>Using the drop-down list is useful when changing the content is important but not necessarily a
+frequent occurrence. In cases where switching the content is more frequent,
+you should use <a href="#Tabs">navigation tabs</a> instead.</p>
+
 
 <p>The basic procedure to enable drop-down navigation is:</p>
 
@@ -1123,36 +1086,31 @@ action bar.</p>
   <li>Create a {@link android.widget.SpinnerAdapter} that provides the
 list of selectable items for the drop-down and the layout to use when drawing each item in the
 list.</li>
-  <li>Implement {@link android.app.ActionBar.OnNavigationListener} to define the behavior that
-occurs when the user selects an item from the list.</li>
-  <li>Enable navigation mode for the action bar with {@link
-android.app.ActionBar#setNavigationMode setNavigationMode()}. For example:
-<pre>
-ActionBar actionBar = getActionBar();
-actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
-</pre>
-  <p class="note"><strong>Note:</strong> You should perform this during your activity's {@link
-android.app.Activity#onCreate
-onCreate()} method.</p>
+  <li>Implement {@link android.support.v7.app.ActionBar.OnNavigationListener} to define the
+  behavior that occurs when the user selects an item from the list.</li>
+  <li>During your activity's {@link android.app.Activity#onCreate
+onCreate()} method, enable the action bar's drop-down list by calling {@link
+android.support.v7.app.ActionBar#setNavigationMode setNavigationMode(NAVIGATION_MODE_LIST)}.
   </li>
   <li>Set the callback for the drop-down list with {@link
-android.app.ActionBar#setListNavigationCallbacks setListNavigationCallbacks()}. For example:
+android.support.v7.app.ActionBar#setListNavigationCallbacks setListNavigationCallbacks()}.
+For example:
 <pre>
 actionBar.setListNavigationCallbacks(mSpinnerAdapter, mNavigationCallback);
 </pre>
 <p>This method takes your {@link android.widget.SpinnerAdapter} and {@link
-android.app.ActionBar.OnNavigationListener}.</p>
+android.support.v7.app.ActionBar.OnNavigationListener}.</p>
 </li>
 </ol>
 
-<p>That's the basic setup. However, implementing the {@link android.widget.SpinnerAdapter} and
-{@link android.app.ActionBar.OnNavigationListener} is where most of the work is done. There are many
-ways you can implement these to define the functionality for your drop-down navigation and
+<p>This procedure is relatively short, but implementing the {@link android.widget.SpinnerAdapter}
+and {@link android.app.ActionBar.OnNavigationListener} is where most of the work is done. There are
+many ways you can implement these to define the functionality for your drop-down navigation and
 implementing various types of {@link android.widget.SpinnerAdapter} is beyond the scope of this
 document (you should refer to the {@link android.widget.SpinnerAdapter} class reference for more
-information). However, below is a simple example for a {@link android.widget.SpinnerAdapter} and
-{@link android.app.ActionBar.OnNavigationListener} to get you started (click the title to
-reveal the sample).</p>
+information). However, below is an example for a {@link android.widget.SpinnerAdapter} and {@link
+android.app.ActionBar.OnNavigationListener} to get you started (click the title to reveal the
+sample).</p>
 
 
 
@@ -1283,31 +1241,71 @@ public class ListContentFragment extends Fragment {
 
 
 
-<h2 id="Style">Styling the Action Bar</h2>
 
-<p>If you've implemented a custom design for the widgets in your application, you might
-also want to redesign some of the action bar to match your app design. To do so, you need to use
-Android's <a
-href="{@docRoot}guide/topics/ui/themes.html">style and theme</a> framework to restyle the action
-bar using special style properties.</p>
 
+<h2 id="Style">Styling the Action Bar</h2>
+
+<p>If you want to implement a visual design that represents your app's brand, the action bar allows
+you to customize each detail of its appearance, including the action bar color, text colors, button
+styles, and more. To do so, you need to use Android's <a href=
+"{@docRoot}guide/topics/ui/themes.html">style and theme</a> framework to restyle the action bar
+using special style properties.</p>
 
-<p class="note"><strong>Note:</strong> In order for background images to change appearance
-depending on the current button state (selected, pressed, unselected), the drawable resource you use
-must be a <a href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList">state
-list drawable</a>.</p>
+<p class="caution"><strong>Caution:</strong> For all background drawables you provide, be sure to
+use <a href="{@docRoot}guide/topics/graphics/2d-graphics.html#nine-patch">Nine-Patch drawables</a>
+to allow stretching. The nine-patch image should be <em>smaller</em> than 40dp tall and 30dp
+wide.</p>
 
-<p class="caution"><strong>Caution:</strong> For all background drawables you provide, be sure to use <a
-href="{@docRoot}guide/topics/graphics/2d-graphics.html#nine-patch">Nine-Patch drawables</a> to allow
-stretching. The Nine-Patch image should be <em>smaller</em> than 40px tall and 30px wide (for the mdpi asset).</p>
 
 
 <h3 id="GeneralStyles">General appearance</h3>
 
 <dl>
+  <dt>{@link android.R.attr#actionBarStyle
+      actionBarStyle}</dt>
+  <dd>Specifies a style resource that defines various style properties
+  for the action bar.
+      <p>The default for this style for this
+      is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionBar
+      Widget.AppCompat.ActionBar}, which is what you should use as the parent style.</p>
+      <p>Supported styles include:</p>
+    <dl>
+      <dt>{@link android.R.attr#background}</dt>
+        <dd>Defines a drawable resource for the action bar background.</dd>
+      <dt>{@link android.R.attr#backgroundStacked}</dt>
+        <dd>Defines a drawable resource for the stacked action bar
+          (the <a href="#Tabs">tabs</a>).</dd>
+      <dt>{@link android.R.attr#backgroundSplit}</dt>
+        <dd>Defines a drawable resource for the <a href="#SplitBar">split action bar</a>.</dd>
+      <dt>{@link android.R.attr#actionButtonStyle}</dt>
+        <dd>Defines a style resource for action buttons.
+          <p>The default for this style for this
+      is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionButton
+      Widget.AppCompat.ActionButton}, which is what you should use as the parent style.</p>
+        </dd>
+      <dt>{@link android.R.attr#actionOverflowButtonStyle}</dt>
+        <dd>Defines a style resource for overflow action items.
+          <p>The default for this style for this
+      is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionButton_Overflow
+      Widget.AppCompat.ActionButton.Overflow}, which is what you should use as the parent style.</p>
+        </dd>
+      <dt>{@link android.R.attr#displayOptions}</dt>
+        <dd>Defines one or more action bar display options, such as whether to use the app logo,
+        show the activity title, or enable the <em>Up</em> action. See {@link
+        android.R.attr#displayOptions} for all possible values.
+      <dt>{@link android.R.attr#divider}</dt>
+        <dd>Defines a drawable resource for the divider between action items.</dd>
+      <dt>{@link android.R.attr#titleTextStyle}</dt>
+        <dd>Defines a style resource for the action bar title.
+          <p>The default for this style for this
+      is {@link android.support.v7.appcompat.R.style#TextAppearance_AppCompat_Widget_ActionBar_Title
+      TextAppearance.AppCompat.Widget.ActionBar.Title}, which is what you should use as the parent
+      style.</p></dd>
+    </dl>
+  </dd>
 
   <dt>{@link android.R.attr#windowActionBarOverlay
-      android:windowActionBarOverlay}</dt>
+      windowActionBarOverlay}</dt>
   <dd>Declares whether the action bar should overlay the activity layout rather than offset the
 activity's layout position (for example, the Gallery app uses overlay mode). This is
 {@code false} by default.
@@ -1322,9 +1320,9 @@ bar.</p>
 draw the action bar with a semi-transparent background by default. However, you can modify it with
 your own styles and the {@link android.R.style#Theme_DeviceDefault DeviceDefault} theme on
 different devices might use an opaque background by default.</p>
-  <p>When overlay mode is enabled, your activity layout has no awareness of the action bar laying on
+  <p>When overlay mode is enabled, your activity layout has no awareness of the action bar lying on
 top of it. So, you must be careful not to place any important information or UI components in the
-area overlayed by the action bar. If appropriate, you can refer to the platform's value for {@link
+area overlaid by the action bar. If appropriate, you can refer to the platform's value for {@link
 android.R.attr#actionBarSize} to determine the height of the action bar, by referencing it
 in your XML layout. For example:</p>
 <pre>
@@ -1334,13 +1332,13 @@ in your XML layout. For example:</p>
 </pre>
   <p>You can also retrieve the action bar height at runtime with {@link
 android.app.ActionBar#getHeight()}. This reflects the height of the action bar at the time it's
-called, which might not include the stacked action bar (due to navigation tabs) if called during early 
-activity lifecycle methods. To see how you can determine the total height at runtime, including the
-stacked action bar, see the <a
-href="{@docRoot}resources/samples/HoneycombGallery/src/com/example/android/hcgallery/TitlesFragment.html"
->{@code TitlesFragment}</a> class in the <a
-href="{@docRoot}resources/samples/HoneycombGallery/index.html"
->Honeycomb Gallery</a> sample app.</p>
+called, which might not include the stacked action bar (due to navigation tabs) if called during
+early activity lifecycle methods. To see how you can determine the total height at runtime,
+including the stacked action bar, see the <a href=
+"{@docRoot}resources/samples/HoneycombGallery/src/com/example/android/hcgallery/TitlesFragment.html">
+{@code TitlesFragment}</a> class in the <a href=
+"{@docRoot}resources/samples/HoneycombGallery/index.html">Honeycomb Gallery</a> sample app.</p>
+
 </dd>
 
 </dl>
@@ -1350,34 +1348,40 @@ href="{@docRoot}resources/samples/HoneycombGallery/index.html"
 
 <dl>
   <dt>{@link android.R.attr#actionButtonStyle
-      android:actionButtonStyle}</dt>
-  <dd>Defines a style resource for the action item buttons.</dd>
+      actionButtonStyle}</dt>
+  <dd>Defines a style resource for the action item buttons.
+      <p>The default for this style for this
+  is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionButton
+  Widget.AppCompat.ActionButton}, which is what you should use as the parent style.</p></dd>
 
   <dt>{@link android.R.attr#actionBarItemBackground
-      android:actionBarItemBackground}</dt>
-  <dd>Defines a drawable resource for each action item's background. (Added in API level 14.)</dd>
+      actionBarItemBackground}</dt>
+  <dd>Defines a drawable resource for each action item's background.
+    This should be a <a href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList"
+    >state-list drawable</a> to indicate different selected states.</dd>
 
   <dt>{@link android.R.attr#itemBackground
-      android:itemBackground}</dt>
-  <dd>Defines a drawable resource for each overflow menu item's background.</dd>
+      itemBackground}</dt>
+  <dd>Defines a drawable resource for each action overflow item's background.
+    This should be a <a href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList"
+    >state-list drawable</a> to indicate different selected states.</dd>
 
   <dt>{@link android.R.attr#actionBarDivider
-      android:actionBarDivider}</dt>
-  <dd>Defines a drawable resource for the divider between action items. (Added in API level
-14.)</dd>
+      actionBarDivider}</dt>
+  <dd>Defines a drawable resource for the divider between action items.</dd>
 
   <dt>{@link android.R.attr#actionMenuTextColor
-      android:actionMenuTextColor}</dt>
+      actionMenuTextColor}</dt>
   <dd>Defines a color for text that appears in an action item.</dd>
 
   <dt>{@link android.R.attr#actionMenuTextAppearance
-      android:actionMenuTextAppearance}</dt>
+      actionMenuTextAppearance}</dt>
   <dd>Defines a style resource for text that appears in an action item.</dd>
 
   <dt>{@link android.R.attr#actionBarWidgetTheme
-      android:actionBarWidgetTheme}</dt>
+      actionBarWidgetTheme}</dt>
   <dd>Defines a theme resource for widgets that are inflated into the action bar as <a
-href="#ActionView">action views</a>. (Added in API level 14.)</dd>
+href="#ActionView">action views</a>.</dd>
 </dl>
 
 
@@ -1385,16 +1389,25 @@ href="#ActionView">action views</a>. (Added in API level 14.)</dd>
 
 <dl>
   <dt>{@link android.R.attr#actionBarTabStyle
-      android:actionBarTabStyle}</dt>
-  <dd>Defines a style resource for tabs in the action bar.</dd>
+      actionBarTabStyle}</dt>
+  <dd>Defines a style resource for tabs in the action bar.
+      <p>The default for this style for this
+  is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionBar_TabView
+  Widget.AppCompat.ActionBar.TabView}, which is what you should use as the parent style.</p></dd>
 
   <dt>{@link android.R.attr#actionBarTabBarStyle
-      android:actionBarTabBarStyle}</dt>
-  <dd>Defines a style resource for the thin bar that appears below the navigation tabs.</dd>
+      actionBarTabBarStyle}</dt>
+  <dd>Defines a style resource for the thin bar that appears below the navigation tabs.
+      <p>The default for this style for this
+  is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionBar_TabBar
+  Widget.AppCompat.ActionBar.TabBar}, which is what you should use as the parent style.</p></dd>
 
   <dt>{@link android.R.attr#actionBarTabTextStyle
-      android:actionBarTabTextStyle}</dt>
-  <dd>Defines a style resource for text in the navigation tabs.</dd>
+      actionBarTabTextStyle}</dt>
+  <dd>Defines a style resource for text in the navigation tabs.
+      <p>The default for this style for this
+  is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_ActionBar_TabText
+  Widget.AppCompat.ActionBar.TabText}, which is what you should use as the parent style.</p></dd>
 </dl>
 
 
@@ -1402,82 +1415,93 @@ href="#ActionView">action views</a>. (Added in API level 14.)</dd>
 
 <dl>
   <dt>{@link android.R.attr#actionDropDownStyle
-      android:actionDropDownStyle}</dt>
-  <dd>Defines a style for the drop-down navigation (such as the background and text styles).</dd>
+      actionDropDownStyle}</dt>
+  <dd>Defines a style for the drop-down navigation (such as the background and text styles).
+      <p>The default for this style for this
+  is {@link android.support.v7.appcompat.R.style#Widget_AppCompat_Spinner_DropDown_ActionBar
+  Widget.AppCompat.Spinner.DropDown.ActionBar}, which is what you should use as the parent
+  style.</p></dd>
 </dl>
 
 
+<h3 id="StyleExample">Example theme</h3>
+
+<p>Here's an example that defines a custom theme for an activity, {@code CustomActivityTheme},
+that includes several styles to customize the action bar.</p>
 
-<p>For example, here's a file that defines a few custom styles for the action bar:</p>
+<p>Notice that there are two version for each action bar style property. The first one
+includes the {@code android:} prefix on the property name to support API levels 11 and higher
+that include these properties in the framework. The second version does <em>not</em>
+include the {@code android:} prefix and is for older versions of the platform, on which
+the system uses the style property from the support library. The effect for each is the same.</p>
 
 <pre>
 &lt;?xml version="1.0" encoding="utf-8"?>
 &lt;resources>
     &lt;!-- the theme applied to the application or activity -->
-    &lt;style name="CustomActivityTheme" parent="@android:style/Theme.Holo">
-        &lt;item name="android:actionBarTabTextStyle">@style/CustomTabTextStyle&lt;/item>
-        &lt;item name="android:actionBarDivider">@drawable/ab_divider&lt;/item>
-        &lt;item name="android:actionBarItemBackground">@drawable/ab_item_background&lt;/item>
+    &lt;style name="CustomActionBarTheme"
+           parent="&#64;style/Theme.AppCompat.Light">
+        &lt;item name="android:actionBarStyle">&#64;style/MyActionBar&lt;/item>
+        &lt;item name="android:actionBarTabTextStyle">&#64;style/TabTextStyle&lt;/item>
+        &lt;item name="android:actionMenuTextColor">&#64;color/actionbar_text&lt;/item>
+
+        &lt;!-- Support library compatibility -->
+        &lt;item name="actionBarStyle">&#64;style/MyActionBar&lt;/item>
+        &lt;item name="actionBarTabTextStyle">&#64;style/TabTextStyle&lt;/item>
+        &lt;item name="actionMenuTextColor">&#64;color/actionbar_text&lt;/item>
     &lt;/style>
 
-    &lt;!-- style for the action bar tab text -->
-    &lt;style name="CustomTabTextStyle" parent="@android:style/TextAppearance.Holo">
-        &lt;item name="android:textColor">#2456c2&lt;/item>
+    &lt;!-- general styles for the action bar -->
+    &lt;style name="MyActionBar"
+           parent="&#64;style/Widget.AppCompat.ActionBar">
+        &lt;item name="android:titleTextStyle">&#64;style/TitleTextStyle&lt;/item>
+        &lt;item name="android:background">&#64;drawable/actionbar_background&lt;/item>
+        &lt;item name="android:backgroundStacked">&#64;drawable/actionbar_background&lt;/item>
+        &lt;item name="android:backgroundSplit">&#64;drawable/actionbar_background&lt;/item>
+
+        &lt;!-- Support library compatibility -->
+        &lt;item name="titleTextStyle">&#64;style/TitleTextStyle&lt;/item>
+        &lt;item name="background">&#64;drawable/actionbar_background&lt;/item>
+        &lt;item name="backgroundStacked">&#64;drawable/actionbar_background&lt;/item>
+        &lt;item name="backgroundSplit">&#64;drawable/actionbar_background&lt;/item>
     &lt;/style>
-&lt;/resources>
-</pre>
 
-<p class="note"><strong>Note:</strong> Be certain that your theme declares a parent theme in the
-{@code &lt;style>} tag, from which it inherits all styles not explicitly declared by your theme.
-When modifying the action bar, using a parent theme is important so that you can simply override the
-action bar styles you want to change without re-implementing the styles you want to leave alone
-(such as text appearance or padding in action items).</p>
+    &lt;!-- action bar title text -->
+    &lt;style name="TitleTextStyle"
+           parent="&#64;style/TextAppearance.AppCompat.Widget.ActionBar.Title">
+        &lt;item name="android:textColor">&#64;color/actionbar_text&lt;/item>
+    &lt;/style>
 
-<p>You can apply your custom theme to the entire application or to individual activities in your
-manifest file like this:</p>
+    &lt;!-- action bar tab text -->
+    &lt;style name="TabTextStyle"
+           parent="&#64;style/Widget.AppCompat.ActionBar.TabText">
+        &lt;item name="android:textColor">&#64;color/actionbar_text&lt;/item>
+    &lt;/style>
+&lt;/resources>
 
-<pre>
-&lt;application android:theme="&#64;style/CustomActivityTheme" ... />
 </pre>
 
-<p>For more information about using style and theme resources in your application, read <a
-href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a>.</p>
-
-
-<h3 id="AdvancedStyles">Advanced styling</h3>
+<p>In your manifest file, you can apply the theme to your entire app:</p>
 
-  <p>If you need more advanced styling for the action bar than is available with the
-properties above, you can include {@link android.R.attr#actionBarStyle android:actionBarStyle} and
-{@link android.R.attr#actionBarSplitStyle android:actionBarSplitStyle} in your activity's theme.
-Each of these specifies another style that can define various properties for the action bar,
-including different backgrounds with {@link android.R.attr#background android:background}, {@link
-android.R.attr#backgroundSplit android:backgroundSplit}, and {@link android.R.attr#backgroundStacked
-android:backgroundStacked}. If you override these action bar styles, be sure that you define a
-parent action bar style such as {@link android.R.style#Widget_Holo_ActionBar
-Widget.Holo.ActionBar}.</p>
+<pre>
+&lt;application android:theme="&#64;style/CustomActionBarTheme" ... />
+</pre>
 
-<p>For example, if you want to change the action bar's background, you can use the following
-styles:</p>
+<p>Or to individual activities:</p>
 
 <pre>
-&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;resources>
-    &lt;!-- the theme applied to the application or activity -->
-    &lt;style name="CustomActivityTheme" parent="@android:style/Theme.Holo">
-        &lt;item name="android:actionBarStyle">@style/MyActionBar&lt;/item>
-        &lt;!-- other activity and action bar styles here -->
-    &lt;/style>
-
-    &lt;!-- style for the action bar backgrounds -->
-    &lt;style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
-        &lt;item name="android:background">@drawable/ab_background&lt;/item>
-        &lt;item name="android:backgroundStacked">@drawable/ab_background&lt;/item>
-        &lt;item name="android:backgroundSplit">@drawable/ab_split_background&lt;/item>
-    &lt;/style>
-&lt;/resources>
+&lt;activity android:theme="&#64;style/CustomActionBarTheme" ... />
 </pre>
 
 
+<p class="caution"><strong>Caution:</strong> Be certain that each theme and style declares a parent
+theme in the {@code &lt;style&gt;} tag, from which it inherits all styles not explicitly declared
+by your theme. When modifying the action bar, using a parent theme is important so that you can
+simply override the action bar styles you want to change without re-implementing the styles you
+want to leave alone (such as text size or padding in action items).</p>
+
+<p>For more information about using style and theme resources in your application, read <a
+href="{@docRoot}guide/topics/ui/themes.html">Styles and Themes</a>.</p>
 
 
 
index a0081e7..24f93f6 100644 (file)
Binary files a/docs/html/images/practices/actionbar-phone-splitaction.png and b/docs/html/images/practices/actionbar-phone-splitaction.png differ
diff --git a/docs/html/images/practices/actionbar-phone-splitaction@2x.png b/docs/html/images/practices/actionbar-phone-splitaction@2x.png
new file mode 100644 (file)
index 0000000..3fe577c
Binary files /dev/null and b/docs/html/images/practices/actionbar-phone-splitaction@2x.png differ
diff --git a/docs/html/images/ui/actionbar-dropdown.png b/docs/html/images/ui/actionbar-dropdown.png
new file mode 100644 (file)
index 0000000..26d171d
Binary files /dev/null and b/docs/html/images/ui/actionbar-dropdown.png differ
diff --git a/docs/html/images/ui/actionbar-dropdown@2x.png b/docs/html/images/ui/actionbar-dropdown@2x.png
new file mode 100644 (file)
index 0000000..07fd2ac
Binary files /dev/null and b/docs/html/images/ui/actionbar-dropdown@2x.png differ
index 5f7aecc..8d217b1 100644 (file)
Binary files a/docs/html/images/ui/actionbar-item-withtext.png and b/docs/html/images/ui/actionbar-item-withtext.png differ
index 7ae46a0..bd1c1e1 100644 (file)
Binary files a/docs/html/images/ui/actionbar-searchview.png and b/docs/html/images/ui/actionbar-searchview.png differ
diff --git a/docs/html/images/ui/actionbar-searchview@2x.png b/docs/html/images/ui/actionbar-searchview@2x.png
new file mode 100644 (file)
index 0000000..e14ba8b
Binary files /dev/null and b/docs/html/images/ui/actionbar-searchview@2x.png differ
index fdbb02c..6f489d9 100644 (file)
Binary files a/docs/html/images/ui/actionbar-shareaction.png and b/docs/html/images/ui/actionbar-shareaction.png differ
diff --git a/docs/html/images/ui/actionbar-shareaction@2x.png b/docs/html/images/ui/actionbar-shareaction@2x.png
new file mode 100644 (file)
index 0000000..d7e7cf7
Binary files /dev/null and b/docs/html/images/ui/actionbar-shareaction@2x.png differ
diff --git a/docs/html/images/ui/actionbar-splitaction.png b/docs/html/images/ui/actionbar-splitaction.png
new file mode 100644 (file)
index 0000000..6995d24
Binary files /dev/null and b/docs/html/images/ui/actionbar-splitaction.png differ
diff --git a/docs/html/images/ui/actionbar-splitaction@2x.png b/docs/html/images/ui/actionbar-splitaction@2x.png
new file mode 100644 (file)
index 0000000..8bc53b8
Binary files /dev/null and b/docs/html/images/ui/actionbar-splitaction@2x.png differ
diff --git a/docs/html/images/ui/actionbar-stacked.png b/docs/html/images/ui/actionbar-stacked.png
deleted file mode 100644 (file)
index 76c8908..0000000
Binary files a/docs/html/images/ui/actionbar-stacked.png and /dev/null differ
diff --git a/docs/html/images/ui/actionbar-tabs-stacked.png b/docs/html/images/ui/actionbar-tabs-stacked.png
new file mode 100644 (file)
index 0000000..23ee0c2
Binary files /dev/null and b/docs/html/images/ui/actionbar-tabs-stacked.png differ
diff --git a/docs/html/images/ui/actionbar-tabs-stacked@2x.png b/docs/html/images/ui/actionbar-tabs-stacked@2x.png
new file mode 100644 (file)
index 0000000..dde19cc
Binary files /dev/null and b/docs/html/images/ui/actionbar-tabs-stacked@2x.png differ
index 9d36db6..55746fe 100644 (file)
Binary files a/docs/html/images/ui/actionbar-tabs.png and b/docs/html/images/ui/actionbar-tabs.png differ
diff --git a/docs/html/images/ui/actionbar-tabs@2x.png b/docs/html/images/ui/actionbar-tabs@2x.png
new file mode 100644 (file)
index 0000000..7157522
Binary files /dev/null and b/docs/html/images/ui/actionbar-tabs@2x.png differ
diff --git a/docs/html/images/ui/actionbar-up.png b/docs/html/images/ui/actionbar-up.png
new file mode 100644 (file)
index 0000000..a797fb6
Binary files /dev/null and b/docs/html/images/ui/actionbar-up.png differ
index 1d01583..c748a51 100644 (file)
Binary files a/docs/html/images/ui/actionbar.png and b/docs/html/images/ui/actionbar.png differ
diff --git a/docs/html/images/ui/actionbar@2x.png b/docs/html/images/ui/actionbar@2x.png
new file mode 100644 (file)
index 0000000..921ebf0
Binary files /dev/null and b/docs/html/images/ui/actionbar@2x.png differ