Merge "DO NOT MERGE - Email support for 7" devices." into honeycomb-mr2
This commit is contained in:
commit
faaf1e60f8
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Account-type picker - xlarge - see layout/ for small-screen version -->
|
<!-- Account-type picker - tablet - see layout/ for small-screen version -->
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -41,22 +41,12 @@
|
||||||
android:layout_height="1px"
|
android:layout_height="1px"
|
||||||
android:background="@color/account_setup_divider_color" />
|
android:background="@color/account_setup_divider_color" />
|
||||||
|
|
||||||
<!-- Button(s) on the right -->
|
|
||||||
<Button
|
|
||||||
android:id="@+id/previous"
|
|
||||||
android:layout_below="@+id/top_divider"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginTop="@dimen/setup_buttons_padding_top"
|
|
||||||
android:layout_marginRight="@dimen/setup_buttons_padding_right"
|
|
||||||
style="@style/accountSetupButton"
|
|
||||||
android:text="@string/previous_action" />
|
|
||||||
|
|
||||||
<!-- Layout on the left containing the setup info -->
|
<!-- Layout on the left containing the setup info -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/main_content"
|
||||||
android:layout_below="@+id/top_divider"
|
android:layout_below="@+id/top_divider"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_toLeftOf="@+id/previous"
|
|
||||||
android:layout_marginRight="64dip"
|
android:layout_marginRight="64dip"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="wrap_content" >
|
||||||
|
@ -95,4 +85,14 @@
|
||||||
style="@style/accountSetupButton"
|
style="@style/accountSetupButton"
|
||||||
android:text="@string/account_setup_account_type_exchange_action" />
|
android:text="@string/account_setup_account_type_exchange_action" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<!-- Previous button (can be below or to the right) -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/previous"
|
||||||
|
android:layout_marginTop="@dimen/setup_buttons_padding_top"
|
||||||
|
android:layout_marginRight="@dimen/setup_buttons_padding_right"
|
||||||
|
style="@style/accountSetupTypePrevious"
|
||||||
|
android:text="@string/previous_action" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
|
@ -15,7 +15,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Common data-entry area of initial account setup screen - email, password, default check -->
|
<!-- Common data-entry area of initial account setup screen - email, password, default check -->
|
||||||
<!-- xlarge version -->
|
<!-- tablet version -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Exchange server settings - xlarge - see layout/ for phone UX variant -->
|
<!-- Exchange server settings - tablet - see layout/ for phone UX variant -->
|
||||||
<!-- This is used directly by the account setup activity, but during settings it is
|
<!-- This is used directly by the account setup activity, but during settings it is
|
||||||
wrapped in an outer layout (account_settings_exchange_fragment) -->
|
wrapped in an outer layout (account_settings_exchange_fragment) -->
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Incoming server settings - xlarge - see layout/ for phone UX variant -->
|
<!-- Incoming server settings - tablet - see layout/ for phone UX variant -->
|
||||||
<!-- This is used directly by the account setup activity, but during settings it is
|
<!-- This is used directly by the account setup activity, but during settings it is
|
||||||
wrapped in an outer layout (account_settings_incoming_fragment) -->
|
wrapped in an outer layout (account_settings_incoming_fragment) -->
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -15,7 +15,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Common data-entry area of account name setup screen - account nickname, user name. -->
|
<!-- Common data-entry area of account name setup screen - account nickname, user name. -->
|
||||||
<!-- xlarge version -->
|
<!-- tablet version -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
|
@ -15,7 +15,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Common data-entry area of account options setup screen - check freq, options, etc. -->
|
<!-- Common data-entry area of account options setup screen - check freq, options, etc. -->
|
||||||
<!-- xlarge version -->
|
<!-- tablet version -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Incoming server settings - xlarge - see layout/ for phone UX variant -->
|
<!-- Incoming server settings - tablet - see layout/ for phone UX variant -->
|
||||||
<!-- This is used directly by the account setup activity, but during settings it is
|
<!-- This is used directly by the account setup activity, but during settings it is
|
||||||
wrapped in an outer layout (account_settings_outgoing_fragment) -->
|
wrapped in an outer layout (account_settings_outgoing_fragment) -->
|
||||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge -->
|
<!-- tablet -->
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge -->
|
<!-- tablet -->
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge -->
|
<!-- tablet -->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge -->
|
<!-- tablet -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -392,4 +392,4 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge -->
|
<!-- tablet -->
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- 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>
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,10 @@
|
||||||
|
|
||||||
<!-- ThreePaneLayout is based on LinearLayout with the orientation always horizontal -->
|
<!-- ThreePaneLayout is based on LinearLayout with the orientation always horizontal -->
|
||||||
|
|
||||||
<!-- for portrait -->
|
<!-- 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. -->
|
<!-- Note the width of each pane is set by code at runtime. -->
|
||||||
<com.android.email.activity.ThreePaneLayout
|
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:splitMotionEvents="true"
|
|
||||||
>
|
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:name="com.android.email.activity.MailboxListFragment"
|
android:name="com.android.email.activity.MailboxListFragment"
|
||||||
|
@ -65,4 +63,4 @@
|
||||||
android:background="@color/message_view_fogged_glass_color"
|
android:background="@color/message_view_fogged_glass_color"
|
||||||
/>
|
/>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</com.android.email.activity.ThreePaneLayout>
|
</merge>
|
|
@ -16,12 +16,10 @@
|
||||||
|
|
||||||
<!-- ThreePaneLayout is based on LinearLayout with the orientation always horizontal -->
|
<!-- ThreePaneLayout is based on LinearLayout with the orientation always horizontal -->
|
||||||
|
|
||||||
<!-- for landscape -->
|
<!-- 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. -->
|
<!-- Note the width of each pane is set by code at runtime. -->
|
||||||
<com.android.email.activity.ThreePaneLayout
|
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:splitMotionEvents="true"
|
|
||||||
>
|
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:name="com.android.email.activity.MailboxListFragment"
|
android:name="com.android.email.activity.MailboxListFragment"
|
||||||
|
@ -52,4 +50,4 @@
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
/>
|
/>
|
||||||
</com.android.email.activity.ThreePaneLayout>
|
</merge>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- large, landscape -->
|
||||||
|
<resources>
|
||||||
|
<!-- Account Setup Activities -->
|
||||||
|
<dimen name="setup_padding_top">16dip</dimen>
|
||||||
|
<dimen name="setup_padding_left">64dip</dimen>
|
||||||
|
<dimen name="setup_padding_right">64dip</dimen>
|
||||||
|
</resources>
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Copyright (C) 2009 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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<style name="accountSetupTypePrevious" parent="@style/accountSetupButton">
|
||||||
|
<item name="android:layout_alignParentBottom">true</item>
|
||||||
|
<item name="android:layout_alignParentLeft">true</item>
|
||||||
|
<item name="android:layout_marginBottom">48dip</item>
|
||||||
|
<item name="android:layout_marginLeft">48dip</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge, landscape -->
|
<!-- tablet, landscape -->
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="message_compose_field_label_width">120dip</dimen>
|
<dimen name="message_compose_field_label_width">120dip</dimen>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge, landscape -->
|
<!-- tablet, landscape -->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Use fixed width in landscape -->
|
<!-- Use fixed width in landscape -->
|
|
@ -14,12 +14,9 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge, portrait -->
|
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="message_compose_field_label_width">120dip</dimen>
|
<dimen name="message_compose_field_label_width">120dip</dimen>
|
||||||
|
|
||||||
<!-- XL activity dimensions -->
|
|
||||||
|
|
||||||
<!-- width of mailbox list -->
|
<!-- width of mailbox list -->
|
||||||
<dimen name="mailbox_list_width">206dip</dimen>
|
<dimen name="mailbox_list_width">206dip</dimen>
|
||||||
<!--
|
<!--
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge, portrait -->
|
<!-- tablet, portrait -->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Use fixed margin in portrait -->
|
<!-- Use fixed margin in portrait -->
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<bool name="use_two_pane">true</bool>
|
||||||
|
</resources>
|
|
@ -14,7 +14,6 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Specializations for xlarge screens - most colors are in values/colors.xml -->
|
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<color name="message_view_fogged_glass_color">#00000000</color>
|
<color name="message_view_fogged_glass_color">#00000000</color>
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- xlarge -->
|
<!-- tablet -->
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Account Setup Activities -->
|
<!-- Account Setup Activities -->
|
|
@ -14,7 +14,7 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Specializations for xlarge screens - most colors are in values/colors.xml -->
|
<!-- Specializations for tablet screens - most colors are in values/colors.xml -->
|
||||||
<resources>
|
<resources>
|
||||||
<!-- The headline at the top of every account settings fragments (in preferences) -->
|
<!-- The headline at the top of every account settings fragments (in preferences) -->
|
||||||
<style name="accountSettingsHeadline">
|
<style name="accountSettingsHeadline">
|
||||||
|
@ -134,4 +134,9 @@
|
||||||
<item name="android:singleLine">true</item>
|
<item name="android:singleLine">true</item>
|
||||||
<item name="android:ellipsize">end</item>
|
<item name="android:ellipsize">end</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="accountSetupTypePrevious" parent="@style/accountSetupButton">
|
||||||
|
<item name="android:layout_toRightOf">@+id/main_content"</item>
|
||||||
|
<item name="android:layout_alignParentRight">true</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- tablet, landscape -->
|
||||||
|
<resources>
|
||||||
|
<!-- Account Setup Activities -->
|
||||||
|
<dimen name="setup_padding_top">16dip</dimen>
|
||||||
|
<dimen name="setup_padding_left">128dip</dimen>
|
||||||
|
<dimen name="setup_padding_right">128dip</dimen>
|
||||||
|
</resources>
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?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.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<bool name="use_two_pane">false</bool>
|
||||||
|
</resources>
|
|
@ -37,7 +37,8 @@ import android.widget.LinearLayout;
|
||||||
/**
|
/**
|
||||||
* The "three pane" layout used on tablet.
|
* The "three pane" layout used on tablet.
|
||||||
*
|
*
|
||||||
* It'll encapsulate the behavioral differences between portrait mode and landscape mode.
|
* This layout can show up to two panes at any given time, and operates in two different modes.
|
||||||
|
* See {@link #isPaneCollapsible()} for details on the two modes.
|
||||||
*
|
*
|
||||||
* TODO Unit tests, when UX is settled.
|
* TODO Unit tests, when UX is settled.
|
||||||
*/
|
*/
|
||||||
|
@ -50,14 +51,21 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
/** Uninitialized state -- {@link #changePaneState} hasn't been called yet. */
|
/** Uninitialized state -- {@link #changePaneState} hasn't been called yet. */
|
||||||
private static final int STATE_UNINITIALIZED = -1;
|
private static final int STATE_UNINITIALIZED = -1;
|
||||||
|
|
||||||
/** Mailbox list + message list */
|
/** Mailbox list + message list both visible. */
|
||||||
private static final int STATE_LEFT_VISIBLE = 0;
|
private static final int STATE_LEFT_VISIBLE = 0;
|
||||||
|
|
||||||
/** Message view on portrait, + message list on landscape. */
|
/**
|
||||||
|
* A view where the MessageView is visible. The MessageList is visible if
|
||||||
|
* {@link #isPaneCollapsible} is false, but is otherwise collapsed and hidden.
|
||||||
|
*/
|
||||||
private static final int STATE_RIGHT_VISIBLE = 1;
|
private static final int STATE_RIGHT_VISIBLE = 1;
|
||||||
|
|
||||||
/** Portrait mode only: message view + expanded message list */
|
/**
|
||||||
private static final int STATE_PORTRAIT_MIDDLE_EXPANDED = 2;
|
* A view where the MessageView is partially visible and a collapsible MessageList on the left
|
||||||
|
* has been expanded to be in view. {@link #isPaneCollapsible} must return true for this
|
||||||
|
* state to be active.
|
||||||
|
*/
|
||||||
|
private static final int STATE_MIDDLE_EXPANDED = 2;
|
||||||
|
|
||||||
// Flags for getVisiblePanes()
|
// Flags for getVisiblePanes()
|
||||||
public static final int PANE_LEFT = 1 << 2;
|
public static final int PANE_LEFT = 1 << 2;
|
||||||
|
@ -75,7 +83,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
private View mRightPane;
|
private View mRightPane;
|
||||||
private MessageCommandButtonView mMessageCommandButtons;
|
private MessageCommandButtonView mMessageCommandButtons;
|
||||||
|
|
||||||
// Views used only on portrait
|
// Views used only when the left pane is collapsible.
|
||||||
private View mFoggedGlass;
|
private View mFoggedGlass;
|
||||||
|
|
||||||
private boolean mFirstSizeChangedDone;
|
private boolean mFirstSizeChangedDone;
|
||||||
|
@ -84,8 +92,8 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
private int mMailboxListWidth;
|
private int mMailboxListWidth;
|
||||||
/**
|
/**
|
||||||
* Message list width, on:
|
* Message list width, on:
|
||||||
* - the message list + message view mode, on landscape.
|
* - the message list + message view mode, when the left pane is not collapsible
|
||||||
* - the message view + expanded message list mode, on portrait.
|
* - the message view + expanded message list mode, when the left pane is collapsible
|
||||||
* Comes from resources.
|
* Comes from resources.
|
||||||
*/
|
*/
|
||||||
private int mMessageListWidth;
|
private int mMessageListWidth;
|
||||||
|
@ -152,14 +160,14 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
(MessageCommandButtonView) findViewById(R.id.message_command_buttons);
|
(MessageCommandButtonView) findViewById(R.id.message_command_buttons);
|
||||||
|
|
||||||
mFoggedGlass = findViewById(R.id.fogged_glass);
|
mFoggedGlass = findViewById(R.id.fogged_glass);
|
||||||
if (mFoggedGlass != null) { // If it's around, it's portrait.
|
if (mFoggedGlass != null) {
|
||||||
mRightPane = findViewById(R.id.right_pane_with_fog);
|
mRightPane = findViewById(R.id.right_pane_with_fog);
|
||||||
mFoggedGlass.setOnClickListener(this);
|
mFoggedGlass.setOnClickListener(this);
|
||||||
} else { // landscape
|
} else {
|
||||||
mRightPane = findViewById(R.id.right_pane);
|
mRightPane = findViewById(R.id.right_pane);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLandscape()) {
|
if (!isPaneCollapsible()) {
|
||||||
mShowHideViews = new View[][][] {
|
mShowHideViews = new View[][][] {
|
||||||
// STATE_LEFT_VISIBLE
|
// STATE_LEFT_VISIBLE
|
||||||
{
|
{
|
||||||
|
@ -173,7 +181,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
{mLeftPane}, // Invisible
|
{mLeftPane}, // Invisible
|
||||||
{}, // Gone
|
{}, // Gone
|
||||||
},
|
},
|
||||||
// STATE_PORTRAIT_MIDDLE_EXPANDED -- not used in landscape
|
// STATE_MIDDLE_EXPANDED
|
||||||
{
|
{
|
||||||
{}, // Visible
|
{}, // Visible
|
||||||
{}, // Invisible
|
{}, // Invisible
|
||||||
|
@ -194,7 +202,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
{mLeftPane, mMiddlePane, mFoggedGlass}, // Invisible
|
{mLeftPane, mMiddlePane, mFoggedGlass}, // Invisible
|
||||||
{}, // Gone
|
{}, // Gone
|
||||||
},
|
},
|
||||||
// STATE_PORTRAIT_MIDDLE_EXPANDED
|
// STATE_MIDDLE_EXPANDED
|
||||||
{
|
{
|
||||||
{mMiddlePane, mRightPane, mMessageCommandButtons, mFoggedGlass}, // Visible
|
{mMiddlePane, mRightPane, mMessageCommandButtons, mFoggedGlass}, // Visible
|
||||||
{mLeftPane}, // Invisible
|
{mLeftPane}, // Invisible
|
||||||
|
@ -216,8 +224,11 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
mCallback = (callback == null) ? EmptyCallback.INSTANCE : callback;
|
mCallback = (callback == null) ? EmptyCallback.INSTANCE : callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isLandscape() {
|
/**
|
||||||
return mFoggedGlass == null;
|
* Return whether or not the left pane should be collapsible.
|
||||||
|
*/
|
||||||
|
private boolean isPaneCollapsible() {
|
||||||
|
return mFoggedGlass != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MessageCommandButtonView getMessageCommandButtons() {
|
public MessageCommandButtonView getMessageCommandButtons() {
|
||||||
|
@ -268,7 +279,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
* @return true if the event is handled.
|
* @return true if the event is handled.
|
||||||
*/
|
*/
|
||||||
public boolean onBackPressed(boolean isSystemBackKey) {
|
public boolean onBackPressed(boolean isSystemBackKey) {
|
||||||
if (isLandscape()) {
|
if (!isPaneCollapsible()) {
|
||||||
switch (mPaneState) {
|
switch (mPaneState) {
|
||||||
case STATE_RIGHT_VISIBLE:
|
case STATE_RIGHT_VISIBLE:
|
||||||
changePaneState(STATE_LEFT_VISIBLE, true); // Close the right pane
|
changePaneState(STATE_LEFT_VISIBLE, true); // Close the right pane
|
||||||
|
@ -280,10 +291,10 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
if (isSystemBackKey) {
|
if (isSystemBackKey) {
|
||||||
changePaneState(STATE_LEFT_VISIBLE, true);
|
changePaneState(STATE_LEFT_VISIBLE, true);
|
||||||
} else {
|
} else {
|
||||||
changePaneState(STATE_PORTRAIT_MIDDLE_EXPANDED, true);
|
changePaneState(STATE_MIDDLE_EXPANDED, true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case STATE_PORTRAIT_MIDDLE_EXPANDED:
|
case STATE_MIDDLE_EXPANDED:
|
||||||
changePaneState(STATE_LEFT_VISIBLE, true);
|
changePaneState(STATE_LEFT_VISIBLE, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +330,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changePaneState(int newState, boolean animate) {
|
private void changePaneState(int newState, boolean animate) {
|
||||||
if (isLandscape() && (newState == STATE_PORTRAIT_MIDDLE_EXPANDED)) {
|
if (!isPaneCollapsible() && (newState == STATE_MIDDLE_EXPANDED)) {
|
||||||
newState = STATE_RIGHT_VISIBLE;
|
newState = STATE_RIGHT_VISIBLE;
|
||||||
}
|
}
|
||||||
if (!mFirstSizeChangedDone) {
|
if (!mFirstSizeChangedDone) {
|
||||||
|
@ -349,7 +360,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
|
|
||||||
final String animatorLabel; // for debug purpose
|
final String animatorLabel; // for debug purpose
|
||||||
|
|
||||||
if (isLandscape()) { // Landscape
|
if (!isPaneCollapsible()) {
|
||||||
setViewWidth(mLeftPane, mMailboxListWidth);
|
setViewWidth(mLeftPane, mMailboxListWidth);
|
||||||
setViewWidth(mRightPane, totalWidth - mMessageListWidth);
|
setViewWidth(mRightPane, totalWidth - mMessageListWidth);
|
||||||
|
|
||||||
|
@ -370,7 +381,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { // Portrait
|
} else {
|
||||||
setViewWidth(mLeftPane, mMailboxListWidth);
|
setViewWidth(mLeftPane, mMailboxListWidth);
|
||||||
setViewWidth(mRightPane, totalWidth);
|
setViewWidth(mRightPane, totalWidth);
|
||||||
|
|
||||||
|
@ -381,7 +392,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
expectedMailboxLeft = 0;
|
expectedMailboxLeft = 0;
|
||||||
expectedMessageListWidth = totalWidth - mMailboxListWidth;
|
expectedMessageListWidth = totalWidth - mMailboxListWidth;
|
||||||
break;
|
break;
|
||||||
case STATE_PORTRAIT_MIDDLE_EXPANDED:
|
case STATE_MIDDLE_EXPANDED:
|
||||||
// mailbox + message list -> message list + message view
|
// mailbox + message list -> message list + message view
|
||||||
animatorLabel = "moving to [message list + message view]";
|
animatorLabel = "moving to [message list + message view]";
|
||||||
expectedMailboxLeft = -mMailboxListWidth;
|
expectedMailboxLeft = -mMailboxListWidth;
|
||||||
|
@ -439,7 +450,7 @@ public class ThreePaneLayout extends LinearLayout implements View.OnClickListene
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.fogged_glass:
|
case R.id.fogged_glass:
|
||||||
if (isLandscape()) {
|
if (!isPaneCollapsible()) {
|
||||||
return; // Shouldn't happen
|
return; // Shouldn't happen
|
||||||
}
|
}
|
||||||
changePaneState(STATE_RIGHT_VISIBLE, true);
|
changePaneState(STATE_RIGHT_VISIBLE, true);
|
||||||
|
|
|
@ -19,6 +19,7 @@ package com.android.email.activity;
|
||||||
import com.android.email.AccountBackupRestore;
|
import com.android.email.AccountBackupRestore;
|
||||||
import com.android.email.Email;
|
import com.android.email.Email;
|
||||||
import com.android.email.ExchangeUtils;
|
import com.android.email.ExchangeUtils;
|
||||||
|
import com.android.email.R;
|
||||||
import com.android.email.activity.setup.AccountSetupBasics;
|
import com.android.email.activity.setup.AccountSetupBasics;
|
||||||
import com.android.email.service.MailService;
|
import com.android.email.service.MailService;
|
||||||
import com.android.emailcommon.provider.EmailContent;
|
import com.android.emailcommon.provider.EmailContent;
|
||||||
|
@ -29,7 +30,6 @@ import com.android.emailcommon.utility.Utility;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -84,8 +84,7 @@ public class Welcome extends Activity {
|
||||||
* @return true if the two-pane activity should be used on the current configuration.
|
* @return true if the two-pane activity should be used on the current configuration.
|
||||||
*/
|
*/
|
||||||
public static boolean useTwoPane(Context context) {
|
public static boolean useTwoPane(Context context) {
|
||||||
final int screenLayout = context.getResources().getConfiguration().screenLayout;
|
return context.getResources().getBoolean(R.bool.use_two_pane);
|
||||||
return (screenLayout & Configuration.SCREENLAYOUT_SIZE_XLARGE) != 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue