There is no longer a collapsible conversaton list pane.
Change-Id: I2a9e4c4156c13ad43cfdb554f9bd4e51f5789e72
This commit is contained in:
parent
0a8228c026
commit
0ec5d6f307
|
@ -1,139 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- tablet -->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/invite_section"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/message_view_info_back_color"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dip"
|
||||
android:orientation="horizontal"
|
||||
>
|
||||
<!-- TODO: The plan is to show a calendar icon here. -->
|
||||
<ImageView
|
||||
android:layout_width="64dip"
|
||||
android:layout_height="64dip"
|
||||
android:layout_weight="0"
|
||||
android:src="@null"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:layout_width="200dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="64dip"
|
||||
android:orientation="horizontal"
|
||||
android:divider="?android:attr/dividerVertical"
|
||||
android:showDividers="middle"
|
||||
android:dividerPadding="16dip"
|
||||
>
|
||||
<RelativeLayout
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
>
|
||||
<CheckBox
|
||||
android:id="@+id/accept"
|
||||
android:layout_width="104dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:text="@string/message_view_invite_accept"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/maybe"
|
||||
android:layout_width="104dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toRightOf="@id/accept"
|
||||
android:layout_marginLeft="24dip"
|
||||
android:text="@string/message_view_invite_maybe"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
<CheckBox
|
||||
android:id="@+id/decline"
|
||||
android:layout_width="104dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_toRightOf="@id/maybe"
|
||||
android:layout_marginLeft="24dip"
|
||||
android:text="@string/message_view_invite_decline"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<!-- "Going?" -->
|
||||
<TextView
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_above="@id/accept"
|
||||
android:layout_marginLeft="32dip"
|
||||
android:layout_marginRight="32dip"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:text="@string/message_view_invite_text"
|
||||
android:textSize="18dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:gravity="left|bottom"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
<Button
|
||||
android:id="@+id/invite_link"
|
||||
android:layout_width="192dip"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dip"
|
||||
android:layout_marginRight="16dip"
|
||||
style="@android:style/Widget.Holo.Button.Borderless"
|
||||
android:padding="0dip"
|
||||
android:text="@string/message_view_invite_view"
|
||||
android:textSize="14dip"
|
||||
android:textColor="@color/text_primary_color"
|
||||
android:textStyle="bold"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
style="@style/message_view_horizontal_divider"
|
||||
/>
|
||||
</LinearLayout>
|
|
@ -19,7 +19,10 @@
|
|||
<!-- Implementation of a three pane layout where two panes are always visible at
|
||||
any given time. -->
|
||||
<!-- Note the width of each pane is set by code at runtime. -->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<com.android.email.activity.ThreePaneLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:splitMotionEvents="true"
|
||||
>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/left_pane"
|
||||
|
@ -47,4 +50,4 @@
|
|||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
</merge>
|
||||
</com.android.email.activity.ThreePaneLayout>
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- ThreePaneLayout is based on LinearLayout with the orientation always horizontal -->
|
||||
|
||||
<!-- Implementation of a three pane layout where in some modes, the left pane is
|
||||
collapsible. -->
|
||||
<!-- Note the width of each pane is set by code at runtime. -->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/left_pane"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<FrameLayout
|
||||
android:id="@+id/middle_pane"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
<FrameLayout
|
||||
android:id="@+id/right_pane_with_fog"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
<FrameLayout
|
||||
android:id="@+id/right_pane"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<include
|
||||
layout="@layout/message_command_button_view"
|
||||
android:id="@+id/message_command_buttons"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<!-- View to snatch all touch events. 100% transparent. -->
|
||||
<View
|
||||
android:id="@+id/fogged_glass"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
/>
|
||||
</FrameLayout>
|
||||
</merge>
|
|
@ -19,9 +19,9 @@
|
|||
<dimen name="message_compose_field_label_width">120dip</dimen>
|
||||
|
||||
<!-- width of mailbox list -->
|
||||
<dimen name="mailbox_list_width">304dip</dimen>
|
||||
<dimen name="mailbox_list_width">240dip</dimen>
|
||||
<!-- width of the message list, on the message list + message view mode. -->
|
||||
<dimen name="message_list_width">428dip</dimen>
|
||||
<dimen name="message_list_width">360dip</dimen>
|
||||
|
||||
<dimen name="action_bar_account_name_max_width">256dip</dimen>
|
||||
<dimen name="action_bar_mailbox_name_left_margin">32dip</dimen>
|
||||
|
|
|
@ -14,14 +14,7 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- Note the width of each pane is set by code at runtime. -->
|
||||
<com.android.email.activity.ThreePaneLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:splitMotionEvents="true"
|
||||
>
|
||||
|
||||
<include layout="@layout/three_pane_impl" />
|
||||
|
||||
</com.android.email.activity.ThreePaneLayout>
|
||||
|
||||
|
||||
<resources>
|
||||
<!-- Expand the middle view when showing the right hand pane -->
|
||||
<bool name="expand_middle_view">false</bool>
|
||||
</resources>
|
|
@ -18,12 +18,12 @@
|
|||
<dimen name="message_compose_field_label_width">120dip</dimen>
|
||||
|
||||
<!-- width of mailbox list -->
|
||||
<dimen name="mailbox_list_width">206dip</dimen>
|
||||
<dimen name="mailbox_list_width">200dip</dimen>
|
||||
<!--
|
||||
width of the message list, on the message list + message view mode.
|
||||
(i.e. on portrait, it's the "expanded" message list.)
|
||||
-->
|
||||
<dimen name="message_list_width">440dip</dimen>
|
||||
<dimen name="message_list_width">0dip</dimen>
|
||||
|
||||
<dimen name="action_bar_account_name_max_width">128dip</dimen>
|
||||
<dimen name="action_bar_mailbox_name_left_margin">16dip</dimen>
|
||||
|
|
|
@ -20,5 +20,9 @@
|
|||
<dimen name="setup_padding_top">16dip</dimen>
|
||||
<dimen name="setup_padding_left">128dip</dimen>
|
||||
<dimen name="setup_padding_right">128dip</dimen>
|
||||
<!-- width of mailbox list -->
|
||||
<dimen name="mailbox_list_width">320dip</dimen>
|
||||
<!-- width of the message list, on the message list + message view mode. -->
|
||||
<dimen name="message_list_width">426dip</dimen>
|
||||
</resources>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -14,13 +14,11 @@
|
|||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- Note the width of each pane is set by code at runtime. -->
|
||||
<com.android.email.activity.ThreePaneLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:splitMotionEvents="true"
|
||||
>
|
||||
|
||||
<include layout="@layout/three_pane_collapsible_impl" />
|
||||
|
||||
</com.android.email.activity.ThreePaneLayout>
|
||||
<!-- tablet, landscape -->
|
||||
<resources>
|
||||
<!-- width of mailbox list -->
|
||||
<dimen name="mailbox_list_width">200dip</dimen>
|
||||
<!-- width of the message list, on the message list + message view mode. -->
|
||||
<dimen name="message_list_width">0dip</dimen>
|
||||
</resources>
|
||||
|
|
@ -19,4 +19,7 @@
|
|||
|
||||
<!-- Reply/Reply All/Forward switcher in action bar -->
|
||||
<bool name="message_compose_action_tabs">false</bool>
|
||||
|
||||
<!-- Expand the middle view when showing the right hand pane -->
|
||||
<bool name="expand_middle_view">true</bool>
|
||||
</resources>
|
||||
|
|
|
@ -44,7 +44,7 @@ import com.android.emailcommon.Logging;
|
|||
*
|
||||
* TODO onVisiblePanesChanged() should be called *AFTER* the animation, not before.
|
||||
*/
|
||||
public class ThreePaneLayout extends LinearLayout implements View.OnClickListener {
|
||||
public class ThreePaneLayout extends LinearLayout {
|
||||
private static final boolean ANIMATION_DEBUG = false; // DON'T SUBMIT WITH true
|
||||
|
||||
private static final int ANIMATION_DURATION = ANIMATION_DEBUG ? 1000 : 150;
|
||||
|
@ -84,9 +84,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
private View mMiddlePane;
|
||||
private View mRightPane;
|
||||
private MessageCommandButtonView mMessageCommandButtons;
|
||||
|
||||
// Views used only when the left pane is collapsible.
|
||||
private View mFoggedGlass;
|
||||
private boolean mConvViewExpandList;
|
||||
|
||||
private boolean mFirstSizeChangedDone;
|
||||
|
||||
|
@ -158,60 +156,50 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
|
||||
mLeftPane = findViewById(R.id.left_pane);
|
||||
mMiddlePane = findViewById(R.id.middle_pane);
|
||||
mMessageCommandButtons =
|
||||
(MessageCommandButtonView) findViewById(R.id.message_command_buttons);
|
||||
mMessageCommandButtons = (MessageCommandButtonView) findViewById(R.id.message_command_buttons);
|
||||
|
||||
mFoggedGlass = findViewById(R.id.fogged_glass);
|
||||
if (mFoggedGlass != null) {
|
||||
mRightPane = findViewById(R.id.right_pane_with_fog);
|
||||
mFoggedGlass.setOnClickListener(this);
|
||||
} else {
|
||||
mRightPane = findViewById(R.id.right_pane);
|
||||
}
|
||||
|
||||
if (!isPaneCollapsible()) {
|
||||
mShowHideViews = new View[][][] {
|
||||
// STATE_LEFT_VISIBLE
|
||||
{
|
||||
{mLeftPane, mMiddlePane}, // Visible
|
||||
{mRightPane}, // Invisible
|
||||
{mMessageCommandButtons}, // Gone
|
||||
},
|
||||
// STATE_RIGHT_VISIBLE
|
||||
{
|
||||
{mMiddlePane, mMessageCommandButtons, mRightPane}, // Visible
|
||||
{mLeftPane}, // Invisible
|
||||
{}, // Gone
|
||||
},
|
||||
// STATE_MIDDLE_EXPANDED
|
||||
{
|
||||
mRightPane = findViewById(R.id.right_pane);
|
||||
mConvViewExpandList = getContext().getResources().getBoolean(R.bool.expand_middle_view);
|
||||
View[][] stateRightVisible = new View[][] {
|
||||
{
|
||||
mMiddlePane, mMessageCommandButtons, mRightPane
|
||||
}, // Visible
|
||||
{
|
||||
mLeftPane
|
||||
}, // Invisible
|
||||
{}, // Gone;
|
||||
};
|
||||
View[][] stateRightVisibleHideConvList = new View[][] {
|
||||
{
|
||||
mRightPane
|
||||
}, // Visible
|
||||
{
|
||||
mMiddlePane, mMessageCommandButtons, mLeftPane
|
||||
}, // Invisible
|
||||
{}, // Gone;
|
||||
};
|
||||
mShowHideViews = new View[][][] {
|
||||
// STATE_LEFT_VISIBLE
|
||||
{
|
||||
{
|
||||
mLeftPane, mMiddlePane
|
||||
}, // Visible
|
||||
{
|
||||
mRightPane
|
||||
}, // Invisible
|
||||
{
|
||||
mMessageCommandButtons
|
||||
}, // Gone
|
||||
},
|
||||
// STATE_RIGHT_VISIBLE
|
||||
mConvViewExpandList ? stateRightVisible : stateRightVisibleHideConvList,
|
||||
// STATE_MIDDLE_EXPANDED
|
||||
{
|
||||
{}, // Visible
|
||||
{}, // Invisible
|
||||
{}, // Gone
|
||||
},
|
||||
};
|
||||
} else {
|
||||
mShowHideViews = new View[][][] {
|
||||
// STATE_LEFT_VISIBLE
|
||||
{
|
||||
{mLeftPane, mMiddlePane}, // Visible
|
||||
{mRightPane, mFoggedGlass}, // Invisible
|
||||
{mMessageCommandButtons}, // Gone
|
||||
},
|
||||
// STATE_RIGHT_VISIBLE
|
||||
{
|
||||
{mRightPane, mMessageCommandButtons}, // Visible
|
||||
{mLeftPane, mMiddlePane, mFoggedGlass}, // Invisible
|
||||
{}, // Gone
|
||||
},
|
||||
// STATE_MIDDLE_EXPANDED
|
||||
{
|
||||
{mMiddlePane, mRightPane, mMessageCommandButtons, mFoggedGlass}, // Visible
|
||||
{mLeftPane}, // Invisible
|
||||
{}, // Gone
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
mInitialPaneState = STATE_LEFT_VISIBLE;
|
||||
|
||||
|
@ -230,7 +218,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
* Return whether or not the left pane should be collapsible.
|
||||
*/
|
||||
public boolean isPaneCollapsible() {
|
||||
return mFoggedGlass != null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public MessageCommandButtonView getMessageCommandButtons() {
|
||||
|
@ -283,25 +271,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
return mRightPane.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the back event.
|
||||
*
|
||||
*/
|
||||
public boolean uncollapsePane() {
|
||||
if (!isPaneCollapsible()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mPaneState == STATE_RIGHT_VISIBLE) {
|
||||
return changePaneState(STATE_MIDDLE_EXPANDED, true);
|
||||
} else if (mInitialPaneState == STATE_RIGHT_VISIBLE) {
|
||||
mInitialPaneState = STATE_MIDDLE_EXPANDED;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the left most pane. (i.e. mailbox list)
|
||||
*/
|
||||
|
@ -360,53 +329,24 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
|
||||
final String animatorLabel; // for debug purpose
|
||||
|
||||
if (!isPaneCollapsible()) {
|
||||
setViewWidth(mLeftPane, mMailboxListWidth);
|
||||
setViewWidth(mRightPane, totalWidth - mMessageListWidth);
|
||||
setViewWidth(mLeftPane, mMailboxListWidth);
|
||||
setViewWidth(mRightPane, totalWidth - getMessageListWidth());
|
||||
|
||||
switch (mPaneState) {
|
||||
case STATE_LEFT_VISIBLE:
|
||||
// mailbox + message list
|
||||
animatorLabel = "moving to [mailbox list + message list]";
|
||||
expectedMailboxLeft = 0;
|
||||
expectedMessageListWidth = totalWidth - mMailboxListWidth;
|
||||
break;
|
||||
case STATE_RIGHT_VISIBLE:
|
||||
// message list + message view
|
||||
animatorLabel = "moving to [message list + message view]";
|
||||
expectedMailboxLeft = -mMailboxListWidth;
|
||||
expectedMessageListWidth = mMessageListWidth;
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
} else {
|
||||
setViewWidth(mLeftPane, mMailboxListWidth);
|
||||
setViewWidth(mRightPane, totalWidth);
|
||||
|
||||
switch (mPaneState) {
|
||||
case STATE_LEFT_VISIBLE:
|
||||
// message list + Message view -> mailbox + message list
|
||||
animatorLabel = "moving to [mailbox list + message list]";
|
||||
expectedMailboxLeft = 0;
|
||||
expectedMessageListWidth = totalWidth - mMailboxListWidth;
|
||||
break;
|
||||
case STATE_MIDDLE_EXPANDED:
|
||||
// mailbox + message list -> message list + message view
|
||||
animatorLabel = "moving to [message list + message view]";
|
||||
expectedMailboxLeft = -mMailboxListWidth;
|
||||
expectedMessageListWidth = mMessageListWidth;
|
||||
break;
|
||||
case STATE_RIGHT_VISIBLE:
|
||||
// message view only
|
||||
animatorLabel = "moving to [message view]";
|
||||
expectedMailboxLeft = -(mMailboxListWidth + mMessageListWidth);
|
||||
expectedMessageListWidth = mMessageListWidth;
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
switch (mPaneState) {
|
||||
case STATE_LEFT_VISIBLE:
|
||||
// mailbox + message list
|
||||
animatorLabel = "moving to [mailbox list + message list]";
|
||||
expectedMailboxLeft = 0;
|
||||
expectedMessageListWidth = totalWidth - mMailboxListWidth;
|
||||
break;
|
||||
case STATE_RIGHT_VISIBLE:
|
||||
// message list + message view
|
||||
animatorLabel = "moving to [message list + message view]";
|
||||
expectedMailboxLeft = -mMailboxListWidth;
|
||||
expectedMessageListWidth = getMessageListWidth();
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
|
||||
final View[][] showHideViews = mShowHideViews[mPaneState];
|
||||
|
@ -426,6 +366,12 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
return true;
|
||||
}
|
||||
|
||||
private int getMessageListWidth() {
|
||||
if (!mConvViewExpandList && mPaneState == STATE_RIGHT_VISIBLE) {
|
||||
return 0;
|
||||
}
|
||||
return mMessageListWidth;
|
||||
}
|
||||
/**
|
||||
* @return The ID of the view for the left pane fragment. (i.e. mailbox list)
|
||||
*/
|
||||
|
@ -447,18 +393,6 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
return R.id.right_pane;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
switch (v.getId()) {
|
||||
case R.id.fogged_glass:
|
||||
if (!isPaneCollapsible()) {
|
||||
return; // Shouldn't happen
|
||||
}
|
||||
changePaneState(STATE_RIGHT_VISIBLE, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void setViewWidth(View v, int value) {
|
||||
v.getLayoutParams().width = value;
|
||||
requestLayout();
|
||||
|
@ -513,6 +447,10 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
|||
animator.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the state of the view. Returns ones of: STATE_UNINITIALIZED,
|
||||
* STATE_LEFT_VISIBLE, STATE_MIDDLE_EXPANDED, STATE_RIGHT_VISIBLE
|
||||
*/
|
||||
public int getPaneState() {
|
||||
return mPaneState;
|
||||
}
|
||||
|
|
|
@ -361,7 +361,6 @@ class UIControllerTwoPane extends UIControllerBase implements ThreePaneLayout.Ca
|
|||
mThreePane.showRightPane();
|
||||
} else if (mListContext.isSearch()) {
|
||||
mThreePane.showRightPane();
|
||||
mThreePane.uncollapsePane();
|
||||
} else {
|
||||
mThreePane.showLeftPane();
|
||||
}
|
||||
|
@ -512,19 +511,6 @@ class UIControllerTwoPane extends UIControllerBase implements ThreePaneLayout.Ca
|
|||
return true;
|
||||
}
|
||||
|
||||
if (mThreePane.showLeftPane()) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// If it's not the system back key, always attempt to uncollapse the left pane first.
|
||||
if (!isSystemBackKey && mThreePane.uncollapsePane()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mActionBarController.onBackPressed(isSystemBackKey)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mThreePane.showLeftPane()) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue