am 92532b1c: am 9d3b1a8d: am 06cc928f: am 1927361b: Merge "Account authentication restyling" into ub-gmail-ur14-dev

* commit '92532b1c213f68aa476b18aded29025393d1de38':
  Account authentication restyling
This commit is contained in:
Tony Mantler 2014-11-02 18:53:10 +00:00 committed by Android Git Automerger
commit 0989761529
14 changed files with 58 additions and 45 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

View File

@ -0,0 +1,27 @@
<!--
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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#8a000000"
android:pathData="M19.0,13.0l-6.0,0.0l0.0,6.0l-2.0,0.0l0.0,-6.0L5.0,13.0l0.0,-2.0l6.0,0.0L11.0,5.0l2.0,0.0l0.0,6.0l6.0,0.0L19.0,13.0z"/>
<path
android:pathData="M0,0h24v24H0V0z"
android:fillColor="#00000000"/>
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -18,23 +18,17 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/no_auth_wrapper"
android:layout_width="match_parent"
<TextView
android:id="@+id/add_authentication"
android:text="@string/add_authentication_label"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/add_authentication"
android:text="@string/add_authentication_label"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_weight="1"
android:padding="16dip"
android:drawablePadding="16dip"
android:drawableStart="@drawable/ic_settings_add"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
</LinearLayout>
android:layout_width="match_parent"
android:padding="8dp"
android:drawablePadding="16dp"
android:drawableStart="@drawable/ic_add_24dp"
android:drawableLeft="@drawable/ic_add_24dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
<LinearLayout
android:id="@+id/password_wrapper"

View File

@ -14,11 +14,11 @@
limitations under the License.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:minWidth="254dp" >
<TextView
android:id="@+id/wrong_password_warning_label"

View File

@ -28,24 +28,18 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
<LinearLayout
android:id="@+id/no_auth_wrapper"
android:layout_width="match_parent"
<TextView
android:id="@+id/add_authentication"
android:text="@string/add_authentication_label"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/add_authentication"
android:text="@string/add_authentication_label"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_weight="1"
android:padding="16dip"
android:drawablePadding="16dip"
style="@style/account_setup_label_text"
android:drawableStart="@drawable/ic_settings_add"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
</LinearLayout>
android:layout_width="match_parent"
android:padding="8dp"
android:drawablePadding="16dip"
style="@style/account_setup_label_text"
android:drawableStart="@drawable/ic_add_24dp"
android:drawableLeft="@drawable/ic_add_24dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
<LinearLayout
android:id="@+id/password_wrapper"

View File

@ -19,7 +19,6 @@
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
<header android:id="@+id/add_account_header"
android:title="@string/add_account"
android:icon="@drawable/ic_settings_add" />
android:title="@string/add_account" />
</preference-headers>

View File

@ -73,7 +73,6 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
super.onFinishInflate();
mPasswordWrapper = UiUtilities.getView(this, R.id.password_wrapper);
mOAuthWrapper = UiUtilities.getView(this, R.id.oauth_wrapper);
mNoAuthWrapper = UiUtilities.getView(this, R.id.no_auth_wrapper);
mPasswordEdit = UiUtilities.getView(this, R.id.password_edit);
mOAuthLabel = UiUtilities.getView(this, R.id.oauth_label);
mClearPasswordView = UiUtilities.getView(this, R.id.clear_password);
@ -178,7 +177,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
// We're authenticated with OAuth.
mOAuthWrapper.setVisibility(View.VISIBLE);
mPasswordWrapper.setVisibility(View.GONE);
mNoAuthWrapper.setVisibility(View.GONE);
mAddAuthenticationView.setVisibility(View.GONE);
if (mPasswordLabel != null) {
mPasswordLabel.setVisibility(View.VISIBLE);
}
@ -186,7 +185,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
// We're authenticated with a password.
mOAuthWrapper.setVisibility(View.GONE);
mPasswordWrapper.setVisibility(View.VISIBLE);
mNoAuthWrapper.setVisibility(View.GONE);
mAddAuthenticationView.setVisibility(View.GONE);
if (TextUtils.isEmpty(mPasswordEdit.getText())) {
mPasswordEdit.requestFocus();
}
@ -195,7 +194,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
// We have no authentication, we need to allow either password or oauth.
mOAuthWrapper.setVisibility(View.GONE);
mPasswordWrapper.setVisibility(View.GONE);
mNoAuthWrapper.setVisibility(View.VISIBLE);
mAddAuthenticationView.setVisibility(View.VISIBLE);
}
} else {
// We're using a POP or Exchange account, which does not offer oAuth.
@ -205,7 +204,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
}
mOAuthWrapper.setVisibility(View.GONE);
mPasswordWrapper.setVisibility(View.VISIBLE);
mNoAuthWrapper.setVisibility(View.GONE);
mAddAuthenticationView.setVisibility(View.GONE);
mClearPasswordView.setVisibility(View.GONE);
if (TextUtils.isEmpty(mPasswordEdit.getText())) {
mPasswordEdit.requestFocus();