Skip to content

Commit 6b3f98b

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: fix action bar style example" into ics-mr1
2 parents f47f679 + b6802e7 commit 6b3f98b

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
@@ -1427,7 +1427,7 @@ href="#ActionView">action views</a>. (Added in API level 14.)</dd>
14271427
&lt;/style>
14281428

14291429
&lt;!-- style for the action bar tab text -->
1430-
&lt;style name="CustomTabTextStyle">
1430+
&lt;style name="CustomTabTextStyle" parent="@android:style/TextAppearance.Holo">
14311431
&lt;item name="android:textColor">#2456c2&lt;/item>
14321432
&lt;/style>
14331433
&lt;/resources>
@@ -1443,8 +1443,7 @@ action bar styles you want to change without re-implementing the styles you want
14431443
manifest file like this:</p>
14441444

14451445
<pre>
1446-
&lt;application android:theme="&#64;style/CustomActivityTheme"
1447-
... />
1446+
&lt;application android:theme="&#64;style/CustomActivityTheme" ... />
14481447
</pre>
14491448

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

1466-
<p>For example, if you want to change the action bar's background, you could use the following
1465+
<p>For example, if you want to change the action bar's background, you can use the following
14671466
styles:</p>
14681467

14691468
<pre>
14701469
&lt;?xml version="1.0" encoding="utf-8"?>
14711470
&lt;resources>
14721471
&lt;!-- the theme applied to the application or activity -->
14731472
&lt;style name="CustomActivityTheme" parent="@android:style/Theme.Holo">
1474-
  &lt;item name="android:actionBarTabTextStyle">@style/customTabTextStyle&lt;/item>
1473+
&lt;item name="android:actionBarStyle">@style/MyActionBar&lt;/item>
14751474
&lt;!-- other activity and action bar styles here -->
14761475
&lt;/style>
14771476

1478-
&lt;!-- style for the action bar, simply to change the background -->
1479-
&lt;style parent="@android:style/Widget.Holo.ActionBar">
1477+
&lt;!-- style for the action bar backgrounds -->
1478+
&lt;style name="MyActionBar" parent="@android:style/Widget.Holo.ActionBar">
14801479
&lt;item name="android:background">@drawable/ab_background&lt;/item>
1481-
&lt;item name="android:backgroundSplit">@drawable/ab_background&lt;/item>
1480+
&lt;item name="android:backgroundStacked">@drawable/ab_background&lt;/item>
1481+
&lt;item name="android:backgroundSplit">@drawable/ab_split_background&lt;/item>
14821482
&lt;/style>
14831483
&lt;/resources>
14841484
</pre>

0 commit comments

Comments
 (0)