Restyle account setup flow nav buttons

b/17266006

Change-Id: Ie60e56b493ba23465a06cce8a3c37d3fd9d061e5
This commit is contained in:
Tony Mantler 2014-10-07 15:19:49 -07:00
parent ab3ed2cb7a
commit 19ebfab06d
36 changed files with 83 additions and 190 deletions

View File

@ -15,6 +15,6 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/button_text_disabled_color" />
<item android:color="@color/button_text_color" />
<item android:state_enabled="false" android:color="@color/text_color_disabled" />
<item android:color="@color/text_color_black" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -1,24 +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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_nav_arrow_left_disabled"
android:state_enabled="false" />
<item android:drawable="@drawable/ic_nav_arrow_left_pressed"
android:state_pressed="true" />
<item android:drawable="@drawable/ic_nav_arrow_left" />
</selector>

View File

@ -1,24 +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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_nav_arrow_right_disabled"
android:state_enabled="false" />
<item android:drawable="@drawable/ic_nav_arrow_right_pressed"
android:state_pressed="true" />
<item android:drawable="@drawable/ic_nav_arrow_right" />
</selector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,24 +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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_nav_arrow_right_disabled"
android:state_enabled="false" />
<item android:drawable="@drawable/ic_nav_arrow_right_pressed"
android:state_pressed="true" />
<item android:drawable="@drawable/ic_nav_arrow_right" />
</selector>

View File

@ -1,24 +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.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_nav_arrow_left_disabled"
android:state_enabled="false" />
<item android:drawable="@drawable/ic_nav_arrow_left_pressed"
android:state_pressed="true" />
<item android:drawable="@drawable/ic_nav_arrow_left" />
</selector>

View File

@ -14,75 +14,78 @@
limitations under the License.
-->
<!-- Account Setup Layout - standard -->
<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
<!-- Account Setup Layout -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<!-- Headline -->
<!-- Set headline for first fragment, change in code as we progress through screens -->
<TextView
android:id="@+id/headline"
android:layout_height="wrap_content"
android:layout_width="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 -->
android:layout_height="0dp"
android:layout_weight="1"
style="@style/account_setup_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/setup_nav_button_padding_top"
android:paddingLeft="@dimen/setup_nav_button_padding_side"
android:paddingRight="@dimen/setup_nav_button_padding_side"
android:paddingBottom="@dimen/setup_nav_button_padding_bottom"
android:orientation="horizontal">
<ImageButton
style="@style/account_setup_nav_button"
android:contentDescription="@string/previous"
android:id="@+id/previous"
android:orientation="vertical" >
<!-- Headline -->
<!-- Set headline for first fragment, change in code as we progress through screens -->
<TextView
android:id="@+id/headline"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/ic_nav_arrow_previous_button"
android:text="@string/next" />
<Button
android:id="@+id/manual_setup"
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:layout_width="wrap_content"
android:text="@string/account_setup_basics_manual_setup_action"
android:visibility="gone"
android:layout_gravity="center_vertical"
style="@style/account_setup_manual_button" />
<View
android:layout_height="match_parent"
android:layout_width="0dp"
android:layout_weight="1" />
<ImageButton
style="@style/account_setup_nav_button"
android:contentDescription="@string/next"
android:id="@+id/next"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/ic_nav_arrow_next_button"
android:text="@string/next" />
android:id="@+id/setup_fragment_content"
style="@style/account_setup_fragment_container"
/>
</LinearLayout>
</ScrollView>
<!-- Buttons below that -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="56dp"
android:orientation="horizontal"
android:background="@color/account_setup_button_bar_background" >
<TextView
android:id="@+id/previous"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:drawableStart="@drawable/ic_prev"
android:drawableLeft="@drawable/ic_prev"
android:drawablePadding="@dimen/setup_nav_button_drawable_padding"
android:text="@string/previous"
style="@style/account_setup_nav_button" />
<TextView
android:id="@+id/manual_setup"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/account_setup_basics_manual_setup_action"
android:visibility="gone"
style="@style/account_setup_nav_button" />
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
<TextView
android:id="@+id/next"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:drawableEnd="@drawable/ic_next"
android:drawableRight="@drawable/ic_next"
android:drawablePadding="@dimen/setup_nav_button_drawable_padding"
android:text="@string/next"
style="@style/account_setup_nav_button" />
</LinearLayout>
</ScrollView>
</LinearLayout>

View File

@ -21,9 +21,6 @@
<dimen name="settings_fragment_padding_side">32dp</dimen>
<dimen name="settings_fragment_padding_bottom">24dp</dimen>
<!-- Account setup nav buttons -->
<dimen name="setup_nav_button_padding_side">64dp</dimen>
<!-- Account setup fragments -->
<dimen name="setup_fragment_padding_top">16dp</dimen>
<dimen name="setup_fragment_padding_side">64dp</dimen>

View File

@ -24,7 +24,7 @@
<color name="account_setup_label_large_text_color">#000000</color>
<color name="account_setup_divider_color">#CCCCCC</color>
<color name="account_setup_xlarge_background_color">#e5e5e5</color>
<color name="account_setup_manual_button_color">#373737</color>
<color name="account_setup_button_bar_background">@color/very_light_grey</color>
<!-- Standard text colors -->
<color name="text_secondary_color">#666666</color>
@ -40,7 +40,6 @@
<color name="combined_view_account_color_8">#ff738359</color>
<color name="combined_view_account_color_9">#ff9d50a4</color>
<color name="button_text_color">#777777</color>
<color name="button_text_disabled_color">#cccccc</color>
<color name="password_warning_color">#d30000</color>

View File

@ -19,11 +19,6 @@
<!-- Boolean value indicating whether the feedback is supported. -->
<bool name="feedback_supported">false</bool>
<!-- Alpha value for 'manual setup' button when disabled -->
<fraction name="manual_setup_disabled_alpha">40%</fraction>
<!-- Alpha value for 'manual setup' button when enabled -->
<fraction name="manual_setup_enabled_alpha">100%</fraction>
<!-- Boolean value indicating if quick responses are supported -->
<bool name="quickresponse_supported">true</bool>

View File

@ -45,9 +45,11 @@
<dimen name="setup_fragment_padding_bottom">16dp</dimen>
<!-- Account setup navigation buttons -->
<dimen name="setup_nav_button_padding_top">24dp</dimen>
<dimen name="setup_nav_button_padding_side">20dp</dimen>
<dimen name="setup_nav_button_padding_bottom">24dp</dimen>
<dimen name="setup_nav_button_padding_top">16dp</dimen>
<dimen name="setup_nav_button_drawable_padding">16dp</dimen>
<dimen name="setup_nav_button_padding_side">12dp</dimen>
<dimen name="setup_nav_button_padding_bottom">16dp</dimen>
<dimen name="setup_nav_button_margin">4dp</dimen>
<!-- Account setup text buttons -->
<!-- See also w600dp -->

View File

@ -59,7 +59,15 @@
<!-- Navigation buttons on the account setup screens -->
<style name="account_setup_nav_button">
<item name="android:background">@android:color/transparent</item>
<item name="android:layout_margin">@dimen/setup_nav_button_margin</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:paddingTop">@dimen/setup_nav_button_padding_top</item>
<item name="android:paddingLeft">@dimen/setup_nav_button_padding_side</item>
<item name="android:paddingRight">@dimen/setup_nav_button_padding_side</item>
<item name="android:paddingBottom">@dimen/setup_nav_button_padding_bottom</item>
<item name="android:textAllCaps">true</item>
<item name="android:textAppearance">?android:attr/textAppearanceMedium</item>
<item name="android:textColor">@color/buttontext</item>
</style>
<!-- Cancel/Done buttons on the account settings (server settings) fragments -->
@ -78,12 +86,6 @@
<item name="android:layout_marginBottom">@dimen/setup_info_text_margin_bottom</item>
</style>
<style name="account_setup_manual_button">
<item name="android:textSize">16sp</item>
<item name="android:textColor">@color/account_setup_manual_button_color</item>
<item name="android:alpha">0.4</item>
</style>
<!-- Account setup row label text -->
<style name="account_setup_label_text">
<item name="android:textColor">?android:attr/textColorPrimary</item>

View File

@ -122,15 +122,6 @@ public class AccountSetupBasicsFragment extends AccountSetupFragment {
public void setNextButtonEnabled(boolean enabled) {
super.setNextButtonEnabled(enabled);
mManualSetupView.setEnabled(enabled);
final float manualButtonAlpha;
if (enabled) {
manualButtonAlpha =
getResources().getFraction(R.fraction.manual_setup_enabled_alpha, 1, 1);
} else {
manualButtonAlpha =
getResources().getFraction(R.fraction.manual_setup_disabled_alpha, 1, 1);
}
mManualSetupView.setAlpha(manualButtonAlpha);
}
public void setEmail(final String email) {