Merge "Account authentication restyling" into ub-gmail-ur14-dev
BIN
res/drawable-hdpi/ic_add_24dp.png
Normal file
After Width: | Height: | Size: 222 B |
Before Width: | Height: | Size: 470 B |
BIN
res/drawable-mdpi/ic_add_24dp.png
Normal file
After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 463 B |
27
res/drawable-v21/ic_add_24dp.xml
Normal 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>
|
BIN
res/drawable-xhdpi/ic_add_24dp.png
Normal file
After Width: | Height: | Size: 199 B |
Before Width: | Height: | Size: 502 B |
BIN
res/drawable-xxhdpi/ic_add_24dp.png
Normal file
After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 1.1 KiB |
@ -18,23 +18,17 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/no_auth_wrapper"
|
android:id="@+id/add_authentication"
|
||||||
android:layout_width="match_parent"
|
android:text="@string/add_authentication_label"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:padding="8dp"
|
||||||
android:id="@+id/add_authentication"
|
android:drawablePadding="16dp"
|
||||||
android:text="@string/add_authentication_label"
|
android:drawableStart="@drawable/ic_add_24dp"
|
||||||
android:layout_height="wrap_content"
|
android:drawableLeft="@drawable/ic_add_24dp"
|
||||||
android:layout_width="match_parent"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:layout_weight="1"
|
android:textColor="?android:attr/textColorPrimary"/>
|
||||||
android:padding="16dip"
|
|
||||||
android:drawablePadding="16dip"
|
|
||||||
android:drawableStart="@drawable/ic_settings_add"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/password_wrapper"
|
android:id="@+id/password_wrapper"
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<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"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
>
|
android:minWidth="254dp" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/wrong_password_warning_label"
|
android:id="@+id/wrong_password_warning_label"
|
||||||
|
@ -28,24 +28,18 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textColor="?android:attr/textColorPrimary"/>
|
android:textColor="?android:attr/textColorPrimary"/>
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/no_auth_wrapper"
|
android:id="@+id/add_authentication"
|
||||||
android:layout_width="match_parent"
|
android:text="@string/add_authentication_label"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:layout_width="match_parent"
|
||||||
<TextView
|
android:padding="8dp"
|
||||||
android:id="@+id/add_authentication"
|
android:drawablePadding="16dip"
|
||||||
android:text="@string/add_authentication_label"
|
style="@style/account_setup_label_text"
|
||||||
android:layout_height="wrap_content"
|
android:drawableStart="@drawable/ic_add_24dp"
|
||||||
android:layout_width="match_parent"
|
android:drawableLeft="@drawable/ic_add_24dp"
|
||||||
android:layout_weight="1"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:padding="16dip"
|
android:textColor="?android:attr/textColorPrimary"/>
|
||||||
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>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/password_wrapper"
|
android:id="@+id/password_wrapper"
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
|
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<header android:id="@+id/add_account_header"
|
<header android:id="@+id/add_account_header"
|
||||||
android:title="@string/add_account"
|
android:title="@string/add_account" />
|
||||||
android:icon="@drawable/ic_settings_add" />
|
|
||||||
|
|
||||||
</preference-headers>
|
</preference-headers>
|
||||||
|
@ -73,7 +73,6 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
|
|||||||
super.onFinishInflate();
|
super.onFinishInflate();
|
||||||
mPasswordWrapper = UiUtilities.getView(this, R.id.password_wrapper);
|
mPasswordWrapper = UiUtilities.getView(this, R.id.password_wrapper);
|
||||||
mOAuthWrapper = UiUtilities.getView(this, R.id.oauth_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);
|
mPasswordEdit = UiUtilities.getView(this, R.id.password_edit);
|
||||||
mOAuthLabel = UiUtilities.getView(this, R.id.oauth_label);
|
mOAuthLabel = UiUtilities.getView(this, R.id.oauth_label);
|
||||||
mClearPasswordView = UiUtilities.getView(this, R.id.clear_password);
|
mClearPasswordView = UiUtilities.getView(this, R.id.clear_password);
|
||||||
@ -178,7 +177,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
|
|||||||
// We're authenticated with OAuth.
|
// We're authenticated with OAuth.
|
||||||
mOAuthWrapper.setVisibility(View.VISIBLE);
|
mOAuthWrapper.setVisibility(View.VISIBLE);
|
||||||
mPasswordWrapper.setVisibility(View.GONE);
|
mPasswordWrapper.setVisibility(View.GONE);
|
||||||
mNoAuthWrapper.setVisibility(View.GONE);
|
mAddAuthenticationView.setVisibility(View.GONE);
|
||||||
if (mPasswordLabel != null) {
|
if (mPasswordLabel != null) {
|
||||||
mPasswordLabel.setVisibility(View.VISIBLE);
|
mPasswordLabel.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
@ -186,7 +185,7 @@ public class AuthenticationView extends LinearLayout implements OnClickListener
|
|||||||
// We're authenticated with a password.
|
// We're authenticated with a password.
|
||||||
mOAuthWrapper.setVisibility(View.GONE);
|
mOAuthWrapper.setVisibility(View.GONE);
|
||||||
mPasswordWrapper.setVisibility(View.VISIBLE);
|
mPasswordWrapper.setVisibility(View.VISIBLE);
|
||||||
mNoAuthWrapper.setVisibility(View.GONE);
|
mAddAuthenticationView.setVisibility(View.GONE);
|
||||||
if (TextUtils.isEmpty(mPasswordEdit.getText())) {
|
if (TextUtils.isEmpty(mPasswordEdit.getText())) {
|
||||||
mPasswordEdit.requestFocus();
|
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.
|
// We have no authentication, we need to allow either password or oauth.
|
||||||
mOAuthWrapper.setVisibility(View.GONE);
|
mOAuthWrapper.setVisibility(View.GONE);
|
||||||
mPasswordWrapper.setVisibility(View.GONE);
|
mPasswordWrapper.setVisibility(View.GONE);
|
||||||
mNoAuthWrapper.setVisibility(View.VISIBLE);
|
mAddAuthenticationView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We're using a POP or Exchange account, which does not offer oAuth.
|
// 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);
|
mOAuthWrapper.setVisibility(View.GONE);
|
||||||
mPasswordWrapper.setVisibility(View.VISIBLE);
|
mPasswordWrapper.setVisibility(View.VISIBLE);
|
||||||
mNoAuthWrapper.setVisibility(View.GONE);
|
mAddAuthenticationView.setVisibility(View.GONE);
|
||||||
mClearPasswordView.setVisibility(View.GONE);
|
mClearPasswordView.setVisibility(View.GONE);
|
||||||
if (TextUtils.isEmpty(mPasswordEdit.getText())) {
|
if (TextUtils.isEmpty(mPasswordEdit.getText())) {
|
||||||
mPasswordEdit.requestFocus();
|
mPasswordEdit.requestFocus();
|
||||||
|