diff options
author | Adam Powell <adamp@google.com> | 2012-04-19 13:52:46 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2012-04-19 14:31:16 -0700 |
commit | b8139af3dcae80c0030afd0354dc424a7c72c3d9 (patch) | |
tree | 3effb1da67632c3dcfe2008f32116c2331735fdf /core/res | |
parent | f40a02f85f112e4b78fcea6f0d0390bfad15c2e2 (diff) | |
download | frameworks_base-b8139af3dcae80c0030afd0354dc424a7c72c3d9.zip frameworks_base-b8139af3dcae80c0030afd0354dc424a7c72c3d9.tar.gz frameworks_base-b8139af3dcae80c0030afd0354dc424a7c72c3d9.tar.bz2 |
Adjust action bar tab policies
Action bar tabs now stack in portrait mode on all screen sizes rather
than display embedded. This only affects apps with a targetSdkVersion
of JB or greater, as older apps may not be prepared for the different
measurement of the bar or have an appropriate stacked bar background
drawable.
Stacked action bar tabs now have a width limit. This prevents
super-wide tabs that can span the whole screen. The cluster of tabs
is centered if it does not span the full width.
Add ActionBarPolicy to give a single point to query for various action
bar measurements and behaviors that vary with configuration.
Change-Id: I01162ca009c14f6f0e712fc906b9db6382c738cd
Diffstat (limited to 'core/res')
-rw-r--r-- | core/res/res/values-port/bools.xml | 19 | ||||
-rw-r--r-- | core/res/res/values-sw600dp/bools.xml | 1 | ||||
-rw-r--r-- | core/res/res/values-w480dp/bools.xml | 2 | ||||
-rw-r--r-- | core/res/res/values-w720dp/bools.xml | 19 | ||||
-rw-r--r-- | core/res/res/values/bools.xml | 3 | ||||
-rw-r--r-- | core/res/res/values/dimens.xml | 9 | ||||
-rw-r--r-- | core/res/res/values/public.xml | 3 |
7 files changed, 53 insertions, 3 deletions
diff --git a/core/res/res/values-port/bools.xml b/core/res/res/values-port/bools.xml new file mode 100644 index 0000000..fc62b69 --- /dev/null +++ b/core/res/res/values-port/bools.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> + <bool name="action_bar_embed_tabs">false</bool> +</resources> diff --git a/core/res/res/values-sw600dp/bools.xml b/core/res/res/values-sw600dp/bools.xml index 2097049..e74379c 100644 --- a/core/res/res/values-sw600dp/bools.xml +++ b/core/res/res/values-sw600dp/bools.xml @@ -17,6 +17,5 @@ <resources> <bool name="preferences_prefer_dual_pane">true</bool> <bool name="show_ongoing_ime_switcher">false</bool> - <bool name="action_bar_expanded_action_views_exclusive">false</bool> <bool name="target_honeycomb_needs_options_menu">false</bool> </resources> diff --git a/core/res/res/values-w480dp/bools.xml b/core/res/res/values-w480dp/bools.xml index 57a2939..3a463a6 100644 --- a/core/res/res/values-w480dp/bools.xml +++ b/core/res/res/values-w480dp/bools.xml @@ -17,6 +17,6 @@ */ --> <resources> - <bool name="action_bar_embed_tabs">true</bool> + <bool name="action_bar_embed_tabs_pre_jb">true</bool> <bool name="split_action_bar_is_narrow">false</bool> </resources> diff --git a/core/res/res/values-w720dp/bools.xml b/core/res/res/values-w720dp/bools.xml new file mode 100644 index 0000000..352c319 --- /dev/null +++ b/core/res/res/values-w720dp/bools.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> + <bool name="action_bar_expanded_action_views_exclusive">false</bool> +</resources> diff --git a/core/res/res/values/bools.xml b/core/res/res/values/bools.xml index 87a98e2..f9762b1 100644 --- a/core/res/res/values/bools.xml +++ b/core/res/res/values/bools.xml @@ -15,7 +15,8 @@ --> <resources> - <bool name="action_bar_embed_tabs">false</bool> + <bool name="action_bar_embed_tabs">true</bool> + <bool name="action_bar_embed_tabs_pre_jb">false</bool> <bool name="split_action_bar_is_narrow">true</bool> <bool name="preferences_prefer_dual_pane">false</bool> <bool name="show_ongoing_ime_switcher">true</bool> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 0442be8..ef80160 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -213,4 +213,13 @@ <!-- Minimum width for an action button in the menu area of an action bar --> <dimen name="action_button_min_width">56dip</dimen> + + <!-- Maximum height for a stacked tab bar as part of an action bar --> + <dimen name="action_bar_stacked_max_height">48dp</dimen> + + <!-- Maximum width for a stacked action bar tab. This prevents + action bar tabs from becoming too wide on a wide screen when only + a few are present. --> + <dimen name="action_bar_stacked_tab_max_width">180dp</dimen> + </resources> diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index b564b97..03ba08c 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -234,6 +234,7 @@ <java-symbol type="attr" name="accessibilityFocusedDrawable"/> <java-symbol type="bool" name="action_bar_embed_tabs" /> + <java-symbol type="bool" name="action_bar_embed_tabs_pre_jb" /> <java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" /> <java-symbol type="bool" name="config_allowActionMenuItemTextWithIcon" /> <java-symbol type="bool" name="config_bluetooth_adapter_quick_switch" /> @@ -292,6 +293,8 @@ <java-symbol type="dimen" name="textview_error_popup_default_width" /> <java-symbol type="dimen" name="toast_y_offset" /> <java-symbol type="dimen" name="volume_panel_top" /> + <java-symbol type="dimen" name="action_bar_stacked_max_height" /> + <java-symbol type="dimen" name="action_bar_stacked_tab_max_width" /> <java-symbol type="string" name="addToDictionary" /> <java-symbol type="string" name="action_bar_home_description" /> |