Skip to content

Commit b6802e7

Browse files
committed
docs: fix action bar style example
Change-Id: I9e02c3b3ade17c832b97836c03cf023fe6ea9340
1 parent ccc11c4 commit b6802e7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/html/guide/topics/ui/actionbar.jd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ href="#ActionView">action views</a>. (Added in API level 14.)</dd>
14211421
&lt;/style>
14221422

14231423
&lt;!-- style for the action bar tab text -->
1424-
&lt;style name="CustomTabTextStyle">
1424+
&lt;style name="CustomTabTextStyle" parent="@android:style/TextAppearance.Holo">
14251425
&lt;item name="android:textColor">#2456c2&lt;/item>
14261426
&lt;/style>
14271427
&lt;/resources>
@@ -1437,8 +1437,7 @@ action bar styles you want to change without re-implementing the styles you want
14371437
manifest file like this:</p>
14381438

14391439
<pre>
1440-
&lt;application android:theme="&#64;style/CustomActivityTheme"
1441-
... />
1440+
&lt;application android:theme="&#64;style/CustomActivityTheme" ... />
14421441
</pre>
14431442

14441443
<p>For more information about using style and theme resources in your application, read <a
@@ -1457,22 +1456,23 @@ android:backgroundStacked}. If you override these action bar styles, be sure tha
14571456
parent action bar style such as {@link android.R.style#Widget_Holo_ActionBar
14581457
Widget.Holo.ActionBar}.</p>
14591458

1460-
<p>For example, if you want to change the action bar's background, you could use the following
1459+
<p>For example, if you want to change the action bar's background, you can use the following
14611460
styles:</p>
14621461

14631462
<pre>
14641463
&lt;?xml version="1.0" encoding="utf-8"?>
14651464
&lt;resources>
14661465
&lt;!-- the theme applied to the application or activity -->
14671466
&lt;style name="CustomActivityTheme" parent="@android:style/Theme.Holo">
1468-
  &lt;item name="android:actionBarTabTextStyle">@style/customTabTextStyle&lt;/item>
1467+
&lt;item name="android:actionBarStyle">@style/MyActionBar&lt;/item>
14691468
&lt;!-- other activity and action bar styles here -->
14701469
&lt;/style>
14711470

1472-
&lt;!-- style for the action bar, simply to change the background -->
1473-
&lt;style parent="@android:style/Widget.Holo.ActionBar">
1471+
&lt;!-- style for the action bar backgrounds -->
1472+
&lt;style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
14741473
&lt;item name="android:background">@drawable/ab_background&lt;/item>
1475-
&lt;item name="android:backgroundSplit">@drawable/ab_background&lt;/item>
1474+
&lt;item name="android:backgroundStacked">@drawable/ab_background&lt;/item>
1475+
&lt;item name="android:backgroundSplit">@drawable/ab_split_background&lt;/item>
14761476
&lt;/style>
14771477
&lt;/resources>
14781478
</pre>

0 commit comments

Comments
 (0)