From 4ca7580e5d0311b12e2e062056d675c7bc45b68b Mon Sep 17 00:00:00 2001 From: Makoto Onuki Date: Wed, 17 Nov 2010 11:23:41 -0800 Subject: [PATCH] New portrait look for 3-pane - Removed opener/collapser - Now the "fogged glass" is 100% transparent - Move the landscape layout to layout-land Bug 3137919 Change-Id: I4918f905aca698c78489e340dd330c7d4da8b106 --- res/{layout => layout-land}/three_pane.xml | 0 res/layout-port/three_pane.xml | 10 +--------- res/values-xlarge/colors.xml | 2 ++ .../email/activity/ThreePaneLayout.java | 20 +++---------------- 4 files changed, 6 insertions(+), 26 deletions(-) rename res/{layout => layout-land}/three_pane.xml (100%) diff --git a/res/layout/three_pane.xml b/res/layout-land/three_pane.xml similarity index 100% rename from res/layout/three_pane.xml rename to res/layout-land/three_pane.xml diff --git a/res/layout-port/three_pane.xml b/res/layout-port/three_pane.xml index 7d083eb2d..a94cbf0b6 100644 --- a/res/layout-port/three_pane.xml +++ b/res/layout-port/three_pane.xml @@ -39,14 +39,6 @@ android:layout_height="match_parent" android:layout_weight="2" /> - - diff --git a/res/values-xlarge/colors.xml b/res/values-xlarge/colors.xml index 83c85f8c0..b0826a13e 100644 --- a/res/values-xlarge/colors.xml +++ b/res/values-xlarge/colors.xml @@ -20,4 +20,6 @@ #FFA6C839 #b6d650 + + #00000000 diff --git a/src/com/android/email/activity/ThreePaneLayout.java b/src/com/android/email/activity/ThreePaneLayout.java index ae88e0aed..e0c29c4a1 100644 --- a/src/com/android/email/activity/ThreePaneLayout.java +++ b/src/com/android/email/activity/ThreePaneLayout.java @@ -62,7 +62,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene private View mRightPane; // Views used only on portrait - private View mCollapser; private View mFoggedGlass; private View mRightWithFog; @@ -107,7 +106,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene if (!isLandscape()) { mFoggedGlass.setOnClickListener(this); - mCollapser.setOnClickListener(this); } changePaneState(STATE_LEFT_VISIBLE, false); @@ -125,15 +123,14 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene mMiddlePane = findViewById(R.id.middle_pane); mRightPane = findViewById(R.id.right_pane); - mCollapser = findViewById(R.id.collapser); - if (mCollapser != null) { // If it's there, it's portrait. - mFoggedGlass = findViewById(R.id.fogged_glass); + mFoggedGlass = findViewById(R.id.fogged_glass); + if (mFoggedGlass != null) { // If it's there, it's portrait. mRightWithFog = findViewById(R.id.right_pane_with_fog); } } private boolean isLandscape() { - return mCollapser == null; + return mFoggedGlass == null; } @Override @@ -215,7 +212,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene mRightPane.setVisibility(View.GONE); } else { // Portrait mMiddlePane.setVisibility(View.VISIBLE); - mCollapser.setVisibility(View.GONE); mRightWithFog.setVisibility(View.GONE); } @@ -228,7 +224,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene mRightPane.setVisibility(View.VISIBLE); } else { // Portrait mMiddlePane.setVisibility(View.GONE); - mCollapser.setVisibility(View.VISIBLE); mRightWithFog.setVisibility(View.VISIBLE); mRightPane.setVisibility(View.VISIBLE); @@ -239,7 +234,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene mLeftPane.setVisibility(View.GONE); mMiddlePane.setVisibility(View.VISIBLE); - mCollapser.setVisibility(View.VISIBLE); mRightWithFog.setVisibility(View.VISIBLE); mRightPane.setVisibility(View.VISIBLE); @@ -273,14 +267,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene @Override public void onClick(View v) { switch (v.getId()) { - case R.id.collapser: - if (isLandscape()) { - return; // Shouldn't happen - } - changePaneState((mPaneState == STATE_RIGHT_VISIBLE) - ? STATE_PORTRAIT_MIDDLE_EXPANDED - : STATE_RIGHT_VISIBLE, true); - break; case R.id.fogged_glass: if (isLandscape()) { return; // Shouldn't happen