diff options
author | Adam Powell <adamp@google.com> | 2014-08-18 19:09:27 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2014-08-19 11:11:42 -0700 |
commit | 2c818ca0a529f872d8f8a42f4c922bbdf9606ebc (patch) | |
tree | 0c42aabf06f7a2f8b34621d268ca3e526a15fbcf | |
parent | a66c40bf6e0fb79ead6d8a9fc29c5671fa7b1206 (diff) | |
download | frameworks_base-2c818ca0a529f872d8f8a42f4c922bbdf9606ebc.zip frameworks_base-2c818ca0a529f872d8f8a42f4c922bbdf9606ebc.tar.gz frameworks_base-2c818ca0a529f872d8f8a42f4c922bbdf9606ebc.tar.bz2 |
Make Toolbars (and Toolbar-based ActionBars) have constant text size
Bug 16397655
Change-Id: I908feb1c0a44e4d6061ed49a81c326c841bb2e7c
-rw-r--r-- | api/current.txt | 2 | ||||
-rw-r--r-- | core/res/res/values/dimens_material.xml | 2 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 3 | ||||
-rw-r--r-- | core/res/res/values/styles_material.xml | 48 |
4 files changed, 46 insertions, 9 deletions
diff --git a/api/current.txt b/api/current.txt index fd7c053..1519eb16 100644 --- a/api/current.txt +++ b/api/current.txt @@ -2047,6 +2047,8 @@ package android { field public static final int TextAppearance_Material_Widget_TextView = 16974381; // 0x103022d field public static final int TextAppearance_Material_Widget_TextView_PopupMenu = 16974382; // 0x103022e field public static final int TextAppearance_Material_Widget_TextView_SpinnerItem = 16974383; // 0x103022f + field public static final int TextAppearance_Material_Widget_Toolbar_Subtitle = 16974569; // 0x10302e9 + field public static final int TextAppearance_Material_Widget_Toolbar_Title = 16974568; // 0x10302e8 field public static final int TextAppearance_Material_WindowTitle = 16974361; // 0x1030219 field public static final int TextAppearance_Medium = 16973892; // 0x1030044 field public static final int TextAppearance_Medium_Inverse = 16973893; // 0x1030045 diff --git a/core/res/res/values/dimens_material.xml b/core/res/res/values/dimens_material.xml index e5a3c17..250d5f8 100644 --- a/core/res/res/values/dimens_material.xml +++ b/core/res/res/values/dimens_material.xml @@ -42,6 +42,8 @@ <dimen name="text_size_headline_material">24sp</dimen> <dimen name="text_size_title_material">20sp</dimen> <dimen name="text_size_subhead_material">16sp</dimen> + <dimen name="text_size_title_material_toolbar">20dp</dimen> + <dimen name="text_size_subtitle_material_toolbar">16dp</dimen> <dimen name="text_size_menu_material">16sp</dimen> <dimen name="text_size_body_2_material">14sp</dimen> <dimen name="text_size_body_1_material">14sp</dimen> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 27c8207..7ade51d 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2530,6 +2530,9 @@ <public type="style" name="Widget.Material.Spinner.Form" /> <public type="style" name="Widget.Material.Light.Spinner.Form" /> + <public type="style" name="TextAppearance.Material.Widget.Toolbar.Title" /> + <public type="style" name="TextAppearance.Material.Widget.Toolbar.Subtitle" /> + <public-padding type="string" name="l_resource_pad" end="0x01040030" /> <public type="string" name="config_webSettingsDefaultTextEncoding" /> diff --git a/core/res/res/values/styles_material.xml b/core/res/res/values/styles_material.xml index 298fea3..9420f3a 100644 --- a/core/res/res/values/styles_material.xml +++ b/core/res/res/values/styles_material.xml @@ -313,15 +313,38 @@ please see styles_device_defaults.xml. </style> <style name="TextAppearance.Material.Widget.ActionMode"/> - <style name="TextAppearance.Material.Widget.ActionMode.Title" parent="TextAppearance.Material.Title" /> - <style name="TextAppearance.Material.Widget.ActionMode.Title.Inverse" parent="TextAppearance.Material.Title.Inverse" /> - <style name="TextAppearance.Material.Widget.ActionMode.Subtitle" parent="TextAppearance.Material.Subhead" /> - <style name="TextAppearance.Material.Widget.ActionMode.Subtitle.Inverse" parent="TextAppearance.Material.Subhead.Inverse" /> - - <style name="TextAppearance.Material.Widget.ActionBar.Title" parent="TextAppearance.Material.Title" /> - <style name="TextAppearance.Material.Widget.ActionBar.Title.Inverse" parent="TextAppearance.Material.Title.Inverse" /> - <style name="TextAppearance.Material.Widget.ActionBar.Subtitle" parent="TextAppearance.Material.Subhead" /> - <style name="TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse" parent="TextAppearance.Material.Subhead.Inverse" /> + <style name="TextAppearance.Material.Widget.ActionMode.Title" + parent="TextAppearance.Material.Title"> + <item name="textSize">@dimen/text_size_title_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionMode.Title.Inverse" + parent="TextAppearance.Material.Title.Inverse"> + <item name="textSize">@dimen/text_size_title_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionMode.Subtitle" + parent="TextAppearance.Material.Subhead"> + <item name="textSize">@dimen/text_size_subtitle_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionMode.Subtitle.Inverse" + parent="TextAppearance.Material.Subhead.Inverse"> + <item name="textSize">@dimen/text_size_subtitle_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionBar.Title" + parent="TextAppearance.Material.Title"> + <item name="textSize">@dimen/text_size_title_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionBar.Title.Inverse" + parent="TextAppearance.Material.Title.Inverse"> + <item name="textSize">@dimen/text_size_title_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionBar.Subtitle" + parent="TextAppearance.Material.Subhead"> + <item name="textSize">@dimen/text_size_subtitle_material_toolbar</item> + </style> + <style name="TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse" + parent="TextAppearance.Material.Subhead.Inverse"> + <item name="textSize">@dimen/text_size_subtitle_material_toolbar</item> + </style> <style name="TextAppearance.Material.Widget.ActionBar.Menu" parent="TextAppearance.Material.Menu"> <item name="textColor">?attr/actionMenuTextColor</item> @@ -333,6 +356,11 @@ please see styles_device_defaults.xml. <item name="textAllCaps">@bool/config_actionMenuItemAllCaps</item> </style> + <style name="TextAppearance.Material.Widget.Toolbar.Title" + parent="TextAppearance.Material.Widget.ActionBar.Title" /> + <style name="TextAppearance.Material.Widget.Toolbar.Subtitle" + parent="TextAppearance.Material.Widget.ActionBar.Subtitle" /> + <style name="TextAppearance.Material.WindowTitle" parent="TextAppearance.Material.Title" /> <style name="TextAppearance.Material.DialogWindowTitle" parent="TextAppearance.Material.Title" /> @@ -759,6 +787,8 @@ please see styles_device_defaults.xml. <style name="Widget.Material.Toolbar" parent="Widget.Toolbar"> <item name="navigationButtonStyle">@style/Widget.Material.Toolbar.Button.Navigation</item> + <item name="titleTextAppearance">@style/TextAppearance.Material.Widget.Toolbar.Title</item> + <item name="subtitleTextAppearance">@style/TextAppearance.Material.Widget.Toolbar.Subtitle</item> </style> <style name="Widget.Material.Toolbar.Button.Navigation" parent="Widget.Toolbar.Button.Navigation"> |