diff options
| author | Tony Mantler <nicoya@google.com> | 2014-03-27 15:40:02 -0700 |
|---|---|---|
| committer | Tony Mantler <nicoya@google.com> | 2014-03-27 16:20:49 -0700 |
| commit | a1916415fa850d7302a32883b424fab4c371b90a (patch) | |
| tree | 6d459e4138025867fea668f43bd3dbe8a2c55668 | |
| parent | 0ecf80685ce776e370444adb1afe3b2317f29de2 (diff) | |
| download | android_packages_apps_Email-a1916415fa850d7302a32883b424fab4c371b90a.tar.gz android_packages_apps_Email-a1916415fa850d7302a32883b424fab4c371b90a.tar.bz2 android_packages_apps_Email-a1916415fa850d7302a32883b424fab4c371b90a.zip | |
Move nav buttons to left and right on account setup flow
For extra-wide displays
b/13640931
Change-Id: Ibc99dc287b9bb3f125abe3f931a34589927443e7
| -rw-r--r-- | res/layout-w1000dp/account_setup_buttons.xml | 37 | ||||
| -rw-r--r-- | res/layout-w1000dp/account_setup_template.xml | 53 | ||||
| -rw-r--r-- | res/layout-w800dp/account_setup_template.xml | 84 | ||||
| -rw-r--r-- | res/layout/account_setup_activity.xml | 1 | ||||
| -rw-r--r-- | res/layout/account_setup_template.xml | 1 | ||||
| -rw-r--r-- | res/values/colors.xml | 1 | ||||
| -rw-r--r-- | res/values/dimensions.xml | 2 | ||||
| -rw-r--r-- | res/values/styles.xml | 2 |
8 files changed, 89 insertions, 92 deletions
diff --git a/res/layout-w1000dp/account_setup_buttons.xml b/res/layout-w1000dp/account_setup_buttons.xml deleted file mode 100644 index f028806fd..000000000 --- a/res/layout-w1000dp/account_setup_buttons.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2014 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. ---> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - android:layout_height="wrap_content"> - <!-- TODO: This file is basically pointless --> - <ImageButton - style="@style/account_setup_nav_button" - android:contentDescription="@string/previous_action" - android:id="@+id/previous" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_nav_arrow_previous_button" - android:text="@string/previous_action"/> - <ImageButton - style="@style/account_setup_nav_button" - android:contentDescription="@string/next_action" - android:id="@+id/next" - android:layout_below="@+id/previous" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/ic_nav_arrow_next_button" - android:text="@string/next_action"/> -</RelativeLayout> diff --git a/res/layout-w1000dp/account_setup_template.xml b/res/layout-w1000dp/account_setup_template.xml deleted file mode 100644 index c01a0cf4b..000000000 --- a/res/layout-w1000dp/account_setup_template.xml +++ /dev/null @@ -1,53 +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. ---> - -<!-- Account Names - XL - portrait - see layout/ for small-screen version --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:fillViewport="true" > - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" > - - <!-- Headline and hairline divider --> - <!-- Set headline for first fragment, change in code as we progress through screens --> - <TextView - android:id="@+id/headline" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/account_setup_options_headline" - style="@style/account_setup_headline" /> - - <!-- Primary Content --> - <FrameLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:id="@+id/setup_fragment_content" - style="@style/account_setup_fragment_container" - /> - <View - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1"/> - - <!-- Buttons below that --> - <!-- TODO: buttons on either side --> - <include layout="@layout/account_setup_buttons" /> - </LinearLayout> -</ScrollView> diff --git a/res/layout-w800dp/account_setup_template.xml b/res/layout-w800dp/account_setup_template.xml new file mode 100644 index 000000000..c47d79a2e --- /dev/null +++ b/res/layout-w800dp/account_setup_template.xml @@ -0,0 +1,84 @@ +<?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. +--> + +<!-- Account Names - XL - portrait - see layout/ for small-screen version --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:background="@color/account_setup_xlarge_background_color" > + <!-- Spacer view --> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1"/> + <ImageButton + style="@style/account_setup_nav_button" + android:contentDescription="@string/previous_action" + android:id="@+id/previous" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/setup_nav_button_padding_side" + android:paddingRight="@dimen/setup_nav_button_padding_side" + android:src="@drawable/ic_nav_arrow_previous_button" + android:text="@string/previous_action" + android:layout_gravity="center_vertical" /> + <ScrollView + style="@style/account_setup_content" + android:layout_width="@dimen/setup_template_content_width" + android:layout_height="match_parent" + android:fillViewport="true" > + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" > + + <!-- Headline and hairline divider --> + <!-- Set headline for first fragment, change in code as we progress through screens --> + <TextView + android:id="@+id/headline" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/account_setup_options_headline" + style="@style/account_setup_headline" /> + + <!-- Primary Content --> + <FrameLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:id="@+id/setup_fragment_content" + style="@style/account_setup_fragment_container" + /> + </LinearLayout> + </ScrollView> + <ImageButton + style="@style/account_setup_nav_button" + android:contentDescription="@string/next_action" + android:id="@+id/next" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/setup_nav_button_padding_side" + android:paddingRight="@dimen/setup_nav_button_padding_side" + android:src="@drawable/ic_nav_arrow_next_button" + android:text="@string/next_action" + android:layout_gravity="center_vertical"/> + <!-- Spacer view --> + <View + android:layout_width="0dp" + android:layout_height="match_parent" + android:layout_weight="1"/> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/account_setup_activity.xml b/res/layout/account_setup_activity.xml index d5b56b1f9..505dd02e5 100644 --- a/res/layout/account_setup_activity.xml +++ b/res/layout/account_setup_activity.xml @@ -18,6 +18,5 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" - style="@style/account_setup_activity" android:id="@+id/setup_fragment_container"> </FrameLayout> diff --git a/res/layout/account_setup_template.xml b/res/layout/account_setup_template.xml index 44c8dfc53..a784973b2 100644 --- a/res/layout/account_setup_template.xml +++ b/res/layout/account_setup_template.xml @@ -18,6 +18,7 @@ <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" + style="@style/account_setup_content" android:fillViewport="true" > <LinearLayout diff --git a/res/values/colors.xml b/res/values/colors.xml index fb86d08d5..62833b7f2 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -22,6 +22,7 @@ <color name="account_setup_info_text_color">#000000</color> <color name="account_setup_label_text_color">#666666</color> <color name="account_setup_divider_color">#CCCCCC</color> + <color name="account_setup_xlarge_background_color">#3b3b3b</color> <!-- Standard text colors --> <color name="text_secondary_color">#666666</color> diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 9aafdf846..b59775363 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -17,6 +17,8 @@ <!-- non-xlarge --> <resources> + <!-- Account setup template for extra-wide layouts --> + <dimen name="setup_template_content_width">600dp</dimen> <!-- Account setup type screen buttons --> <dimen name="setup_account_type_button_min_width">100sp</dimen> diff --git a/res/values/styles.xml b/res/values/styles.xml index a6aebb8b6..cfe25b813 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -16,7 +16,7 @@ <resources> <!-- Account Setup Activity --> - <style name="account_setup_activity"> + <style name="account_setup_content"> <item name="android:background">@drawable/account_setup_background</item> </style> |
