From 136a10a2b83c3de74857578937a1e81c3e81db73 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Mon, 14 Nov 2011 15:32:32 -0800 Subject: Fix bug 5594320 - Overlay action bar decor layout causes two measure passes The existing action bar overlay decor layouts hit a case in RelativeLayout that causes two measure passes for the main content. As this can be expensive, stick the bar and the content overlay into their own sub-layout and switch things to use a FrameLayout at the top level instead. Be explicit about the layout_width/height on ActionBar-containing decor layouts as the older decor layouts are. Change-Id: I4330f0f25841dd8058b94a320f93bf67fb56bf17 --- core/res/res/layout/screen_action_bar.xml | 2 + core/res/res/layout/screen_action_bar_overlay.xml | 53 ++++++++++++---------- core/res/res/layout/screen_simple.xml | 2 + .../layout/screen_simple_overlay_action_mode.xml | 2 + 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/core/res/res/layout/screen_action_bar.xml b/core/res/res/layout/screen_action_bar.xml index 2392618c539b..b0f1bc5e680b 100644 --- a/core/res/res/layout/screen_action_bar.xml +++ b/core/res/res/layout/screen_action_bar.xml @@ -19,6 +19,8 @@ This is an optimized layout for a screen with the Action Bar enabled. --> - - - - + - - + android:layout_alignParentTop="true" + style="?android:attr/actionBarStyle" + android:gravity="top"> + + + + + - + diff --git a/core/res/res/layout/screen_simple.xml b/core/res/res/layout/screen_simple.xml index 87c29f6ebf03..c1914e7964b9 100644 --- a/core/res/res/layout/screen_simple.xml +++ b/core/res/res/layout/screen_simple.xml @@ -22,6 +22,8 @@ enabled. -->