summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Adam Powell <adamp@google.com> 2011-01-28 13:58:28 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2011-01-28 13:58:28 -0800
commit6b2fda9f4bcc5c35f605876a5c9da9b226196f5e (patch)
tree1f014529e98fe1d39fb61936b9329b4c947aaab3
parentcfd0bafdebf1fccd3f5a0baed5cad8a539546e9b (diff)
parent55f3af27ed0eba0f6f73590d087fb3d5491d3504 (diff)
Merge "Fix bug 3399992 - Make ActionBar menu text styleable" into honeycomb
-rw-r--r--api/current.xml22
-rw-r--r--core/res/res/layout/action_menu_item_layout.xml4
-rwxr-xr-xcore/res/res/values/attrs.xml6
-rw-r--r--core/res/res/values/public.xml2
-rw-r--r--core/res/res/values/themes.xml2
5 files changed, 33 insertions, 3 deletions
diff --git a/api/current.xml b/api/current.xml
index 2ebf2ed5edce..bd5969414692 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1885,6 +1885,28 @@
visibility="public"
>
</field>
+<field name="actionMenuTextAppearance"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843616"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="actionMenuTextColor"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843617"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="actionModeBackground"
type="int"
transient="false"
diff --git a/core/res/res/layout/action_menu_item_layout.xml b/core/res/res/layout/action_menu_item_layout.xml
index 4477df7aaf3e..15dfea36ca6d 100644
--- a/core/res/res/layout/action_menu_item_layout.xml
+++ b/core/res/res/layout/action_menu_item_layout.xml
@@ -40,9 +40,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
- android:textAppearance="?attr/textAppearanceMedium"
+ android:textAppearance="?attr/actionMenuTextAppearance"
style="?attr/buttonStyleSmall"
- android:textColor="?attr/textColorPrimary"
+ android:textColor="?attr/actionMenuTextColor"
android:background="@null"
android:paddingLeft="4dip"
android:paddingRight="4dip" />
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 4a5653212ce1..f9809709fa55 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -587,7 +587,11 @@
<attr name="actionBarSize" format="dimension" >
<enum name="wrap_content" value="0" />
</attr>
-
+ <!-- TextAppearance style that will be applied to text that
+ appears within action menu items. -->
+ <attr name="actionMenuTextAppearance" format="reference" />
+ <!-- Color for text that appears within action menu items. -->
+ <attr name="actionMenuTextColor" format="color|reference" />
<!-- =================== -->
<!-- Action mode styles -->
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 957707d49a68..02b42d061405 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1430,6 +1430,8 @@
<public type="attr" name="calendarViewStyle" />
<public type="attr" name="textEditSidePasteWindowLayout" />
<public type="attr" name="textEditSideNoPasteWindowLayout" />
+ <public type="attr" name="actionMenuTextAppearance" />
+ <public type="attr" name="actionMenuTextColor" />
<!-- A simple fade-in animation. -->
<public type="animator" name="fade_in" id="0x010b0000" />
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index c5ae77fbd5cf..38b068e25c95 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -270,6 +270,8 @@
<item name="actionBarStyle">@android:style/Widget.ActionBar</item>
<item name="actionBarSize">56dip</item>
<item name="actionModePopupWindowStyle">?android:attr/popupWindowStyle</item>
+ <item name="actionMenuTextAppearance">?android:attr/textAppearanceMedium</item>
+ <item name="actionMenuTextColor">?android:attr/textColorPrimary</item>
<item name="dividerVertical">@drawable/divider_vertical_dark</item>
<item name="dividerHorizontal">@drawable/divider_vertical_dark</item>