diff options
author | Adam Powell <adamp@google.com> | 2011-04-27 19:24:47 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2011-04-28 19:13:25 -0700 |
commit | 9b4bee0f14bbd137b0797127aff2df46a6321ec5 (patch) | |
tree | 9f3e8760941e431286b976e0b8d28b702d9d250d /policy/src | |
parent | d93e19aef7abdac18788d5198eb5cdae06f016fd (diff) | |
download | frameworks_base-9b4bee0f14bbd137b0797127aff2df46a6321ec5.zip frameworks_base-9b4bee0f14bbd137b0797127aff2df46a6321ec5.tar.gz frameworks_base-9b4bee0f14bbd137b0797127aff2df46a6321ec5.tar.bz2 |
Introducing the split action bar.
Apply (or extend) the theme Theme.Holo.SplitActionBarWhenNarrow or
Theme.Holo.Light.SplitActionBarWhenNarrow to enable splitting the
action bar across both the top and bottom of the screen. This places
the action menu along the bottom, leaving more room at the top for
titles, navigation, and custom views and more room at the bottom for
menu items.
TODO: Refine layout of the action menu when placed at the bottom of
the screen. Make action modes split as well.
Change-Id: I92c91f99c533f26aecf6b828ed041386c4f16922
Diffstat (limited to 'policy/src')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 73003c8..27b7e1c 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -2587,6 +2587,21 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if ((localFeatures & (1 << FEATURE_INDETERMINATE_PROGRESS)) != 0) { mActionBar.initIndeterminateProgress(); } + + final boolean splitActionBar = getWindowStyle().getBoolean( + com.android.internal.R.styleable.Window_windowSplitActionBar, false); + if (splitActionBar) { + final ViewGroup splitView = (ViewGroup) findViewById( + com.android.internal.R.id.lower_action_context_bar); + if (splitView != null) { + mActionBar.setSplitActionBar(splitActionBar); + mActionBar.setSplitView(splitView); + } else { + Log.e(TAG, "Window style requested split action bar with " + + "incompatible window decor! Ignoring request."); + } + } + // Post the panel invalidate for later; avoid application onCreateOptionsMenu // being called in the middle of onCreate or similar. mDecor.post(new Runnable() { |