diff options
author | Dianne Hackborn <hackbod@google.com> | 2013-02-26 14:53:55 -0800 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2013-02-27 18:27:42 -0800 |
commit | df7221ced3b7cd807f14e84c302fc09fd659fd68 (patch) | |
tree | 2e5cdc00c406f577492a7168580fa6c127b0a1f4 /policy | |
parent | d0d209ed4d6280b6e1203eebe823f04f9db766c0 (diff) | |
download | frameworks_base-df7221ced3b7cd807f14e84c302fc09fd659fd68.zip frameworks_base-df7221ced3b7cd807f14e84c302fc09fd659fd68.tar.gz frameworks_base-df7221ced3b7cd807f14e84c302fc09fd659fd68.tar.bz2 |
Unify normal and overlay action bar layouts.
Switch the action bar to always use the overlay layout, and
make it smarter to do the right thing depending on whether the
action bar is in overlay mode or not.
This allows apps to use the system UI magic flags without
having to worry about whether the action bar is configured
in overlay mode or note -- just select a stable layout and it
will automatically go into overlay mode.
In the future this should also allow us to simplify the action
bar code, since it is all sitting on one common implementation.
For example, much of the logic in ActionBarImpl can be moved
to the root action bar layout, and that layout can be optimized
to do custom layout with all of the known elements it has.
Also fixed a little bug in the performance tests.
Change-Id: Iec0c0c0699754f0d1ce37402d786b4966e052a56
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index e1d9b73..5ad305c 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -33,6 +33,7 @@ import com.android.internal.view.menu.MenuPresenter; import com.android.internal.view.menu.MenuView; import com.android.internal.widget.ActionBarContainer; import com.android.internal.widget.ActionBarContextView; +import com.android.internal.widget.ActionBarOverlayLayout; import com.android.internal.widget.ActionBarView; import android.app.KeyguardManager; @@ -2788,11 +2789,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { com.android.internal.R.attr.dialogTitleDecorLayout, res, true); layoutResource = res.resourceId; } else if ((features & (1 << FEATURE_ACTION_BAR)) != 0) { - if ((features & (1 << FEATURE_ACTION_BAR_OVERLAY)) != 0) { - layoutResource = com.android.internal.R.layout.screen_action_bar_overlay; - } else { - layoutResource = com.android.internal.R.layout.screen_action_bar; - } + layoutResource = com.android.internal.R.layout.screen_action_bar; } else { layoutResource = com.android.internal.R.layout.screen_title; } |