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
This commit is contained in:
Makoto Onuki 2010-11-17 11:23:41 -08:00
parent 6ffdecfbbb
commit 4ca7580e5d
4 changed files with 6 additions and 26 deletions

View File

@ -39,14 +39,6 @@
android:layout_height="match_parent"
android:layout_weight="2"
/>
<!-- STOPSHIP Don't use hardcoded color -->
<View
android:id="@+id/collapser"
android:layout_width="30dip"
android:layout_height="match_parent"
android:layout_weight="0"
android:background="#ff0"
/>
<FrameLayout
android:id="@+id/right_pane_with_fog"
android:layout_width="0dip"
@ -63,7 +55,7 @@
android:id="@+id/fogged_glass"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#c0ffffff"
android:background="@color/message_view_fogged_glass_color"
/>
</FrameLayout>
</com.android.email.activity.ThreePaneLayout>

View File

@ -20,4 +20,6 @@
<!-- Account setup screens -->
<color name="account_setup_title_color">#FFA6C839</color>
<color name="account_setup_divider_color">#b6d650</color>
<color name="message_view_fogged_glass_color">#00000000</color>
</resources>

View File

@ -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