From f5b5fe1cb34dc93c884b1217c5e230059baeb887 Mon Sep 17 00:00:00 2001 From: Tony Mantler Date: Wed, 8 Oct 2014 14:25:22 -0700 Subject: [PATCH] Account authentication restyling - Add minWidth to fragment - Remove extraneous LinearLayout and tweak margins to avoid layout jumps - Change + asset - Remove old + icon from prefs header from Email b/8134410 Change-Id: If3371017359b47d9e4280b09fd3bb074b024c23c --- res/drawable-hdpi/ic_add_24dp.png | Bin 0 -> 222 bytes res/drawable-hdpi/ic_settings_add.png | Bin 470 -> 0 bytes res/drawable-mdpi/ic_add_24dp.png | Bin 0 -> 174 bytes res/drawable-mdpi/ic_settings_add.png | Bin 463 -> 0 bytes res/drawable-v21/ic_add_24dp.xml | 27 +++++++++++++++++ res/drawable-xhdpi/ic_add_24dp.png | Bin 0 -> 199 bytes res/drawable-xhdpi/ic_settings_add.png | Bin 502 -> 0 bytes res/drawable-xxhdpi/ic_add_24dp.png | Bin 0 -> 223 bytes res/drawable-xxhdpi/ic_settings_add.png | Bin 1100 -> 0 bytes res/layout-w600dp/authentication_view.xml | 26 +++++++--------- .../account_setup_credentials_fragment.xml | 10 +++---- res/layout/authentication_view.xml | 28 +++++++----------- res/xml/email_extra_preference_headers.xml | 3 +- .../activity/setup/AuthenticationView.java | 9 +++--- 14 files changed, 58 insertions(+), 45 deletions(-) create mode 100644 res/drawable-hdpi/ic_add_24dp.png delete mode 100644 res/drawable-hdpi/ic_settings_add.png create mode 100644 res/drawable-mdpi/ic_add_24dp.png delete mode 100644 res/drawable-mdpi/ic_settings_add.png create mode 100644 res/drawable-v21/ic_add_24dp.xml create mode 100644 res/drawable-xhdpi/ic_add_24dp.png delete mode 100644 res/drawable-xhdpi/ic_settings_add.png create mode 100644 res/drawable-xxhdpi/ic_add_24dp.png delete mode 100644 res/drawable-xxhdpi/ic_settings_add.png diff --git a/res/drawable-hdpi/ic_add_24dp.png b/res/drawable-hdpi/ic_add_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..492c8f8809dd513215e05b8ac2d5f10d8d3a2cf8 GIT binary patch literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8K;Lb6AYF9SoB8UsT^3j@P1pisjL z28L1t28LG&3=CE?7#PG0=Ijcz0ZK3>dAqwX{BQ3+vmeOgEbxddW?H@w58PkjisV59AJUr|T6P%i*BwjV9C{K_x&A6hF#M`7|A0k+- zP${77xJWgyq*>vcF!O~w9>&cpo^8EYVv;40%d;rzp?%b4zT{?xis=qB)6?c~0&QUM MboFyt=akR{0NSBEM*si- literal 0 HcmV?d00001 diff --git a/res/drawable-hdpi/ic_settings_add.png b/res/drawable-hdpi/ic_settings_add.png deleted file mode 100644 index 0a6d8792fedb586d21a66e699e48d80f482460bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 470 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3Ea{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&#%hnWu|mh{y4_(;T^&40&ARmmP{ZHg)H* zH@1s^?{q7VOKVxhtt@7479`PjvfV*bRi86A=%8Y#uLGmngPhyq32Z^*YTq8?+%p@o%+fv$mtm4U&uW&B4_ zH00)|WTsW(*6{rI_6nc|NstY}`DrEPiAAXljw$&`sS2LCiRr09sfj6-g(p)%;mhFZ L>gTe~DWM4fO=~G=WkLM z=IP=XVsScICsl#hfG?T%zhlv2sSO!F`t?m#E=n|!^SElTX0ryv?leikko@}rKphO8 Lu6{1-oD!M<0$40# literal 0 HcmV?d00001 diff --git a/res/drawable-mdpi/ic_settings_add.png b/res/drawable-mdpi/ic_settings_add.png deleted file mode 100644 index f0eedd158bfdf1b4126ea72f94ead0221edfa2ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 463 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VOS+@4BLl<6e(pbstUx|vage(c z!@6@aFM%9|WRD45bDP46hOx7_4S6Fo+k-*%fF5lweEp zc6VX;4}uH!E}sk(;VkfoEC$jZVC;4>+YZQ>@9E+gVsZNI%K_Ea{sRmw#@#!2$#N$v|B=lN zGH&;L`azJHW74M<)t|AA=l#D&tjbpXI+gFe!}BEB4-8VCl}^u=u1%bO?(_Ec)7^(o z`)!@bzizW|0jt!#|7B_>n-!-Q#C;3C(=f4X`t|*0ueaZm7qVjvu{Y^DUv3Tb8G~wx zYeY#(Vo9o1a#1RfVlXl=G|@FM(ls;+F*33;w6HQU&^55IGBB97jQQ7J{an^LB{Ts5 Dn2(sq diff --git a/res/drawable-v21/ic_add_24dp.xml b/res/drawable-v21/ic_add_24dp.xml new file mode 100644 index 000000000..35ecb415e --- /dev/null +++ b/res/drawable-v21/ic_add_24dp.xml @@ -0,0 +1,27 @@ + + + + + diff --git a/res/drawable-xhdpi/ic_add_24dp.png b/res/drawable-xhdpi/ic_add_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..0d8af34b9ea7083d459ef979a59745a1c82bebf9 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA0wn)(8}a}tg=CK)Uj~LMH3o);76yi2K%s^g z3=E|}g|8AA7_4S6Fo+k-*%fF5lweBoc6VX;-`;;_Kaj^+;1OBOz`!jG!i)^F=12eq z?LA!_Ln02py|$5;L4k+apvvU?^iFnx1w8NMDmxcllgVGtz~CTt!I~AQR=&Y5*6e_( lgD)e4gVBRpb_SzH*8NM26mwtg*8)m2c)I$ztaD0e0suHNGLrxR literal 0 HcmV?d00001 diff --git a/res/drawable-xhdpi/ic_settings_add.png b/res/drawable-xhdpi/ic_settings_add.png deleted file mode 100644 index f82bfe59fa3816fb3dbb57c81742dec9e2839a64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 502 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEEa{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvKUBvfU(=jY&#(1n5TF=jyY(=O0$0&CBdY^88`z$CMmVP2-O9n!b>V>3 zvgiuk*OR#~L^QvCpY)8sujzhqML6d-rJarMV_%TlgGAo2xd+SA-x?@B z&*A&|JxOEJ>i0?FB?m9@MrLJ^>bP0l+XkKc;vEK diff --git a/res/drawable-xxhdpi/ic_add_24dp.png b/res/drawable-xxhdpi/ic_add_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..70e4e86e7686b4ea55cbfec722973002f9563cf7 GIT binary patch literal 223 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY0wn)GsXhaw6p}rHd>I(3)EF2VS{N990fib~ zFff!FFfhDIU|_JC!N4G1FlSew4N!t9$=lt9;eUJonf*W>XMsm#F#`j)FbFd;%$g$s z6b$!taSX}0_x9RGUIqmoW`in|@6)IDE}bf1!R|6|(Gi())dnc&JGqyi0}5Uk2bApz qQBY8@W`Thau2p}xJ3v5xvsgukx8cY4*G>biVDNPHb6Mw<&;$T)u|8b@ literal 0 HcmV?d00001 diff --git a/res/drawable-xxhdpi/ic_settings_add.png b/res/drawable-xxhdpi/ic_settings_add.png deleted file mode 100644 index a027b3c76cb97e296e591b0be6b8f3328bc53729..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1100 zcmbVLzi-n(6po4%p{j+60S0uqLM+7gIkA(NhLXk(jYQHa4QeDLgkxVCE49zqm&U13 zg;-F97`rm?2QVW6;)m1$gaimNv=i#U0umDg(1GVPDGY&ulkNNA_kG`c@7~*3s9c;J zKQSJQ#U@L0S{3H$=sg^Vue!JG!*rbKb+$;GtZVormbYkwpps)OlPWQ+-u0IR5Qmy} ztm~FyPgDl%_j{ExPDTiz;$1TZavFsH{%br{F$>Lh2 zX0El(ti{coN7JDS1P);a3Y`@|*nffnp?T#GSJ6@+fL%XgDJ^_K;l z&1NGGNlJi4BIvoy2or8FHDu68VEVSlZ0e$j(P+>P%W>f8eh7|NE*}uP!5~qPG9ffP z0rR5ZI8j`E>ws0sZ#PC-2eqC@genPW$2Z|Vno~nCks)}a&igi8im{?mv*Qq# zm9!iOe|XEbR571{ET&UpS`w8E#+kgL=_#!!>X}RtCyPUlQCPVsrS#dPm?_`_#(FY~ z_1U~qNTxMK)(cr_h%LDRGhCAlb#2hac{!y60I;C?7pz+FiNUB}qjY6h0Shh4Xwae_ zDlE#VY?!ti?W612k5(hTy-KX2PaV|HuWFCb7o|~g=k=5hE-7-F8(^*f$(aDo2vKqT zQ7pqFsK97>Q2MYrXddE1$N111W7YNBRbrsJ}~kMSC!N?ba{Htx|&k diff --git a/res/layout-w600dp/authentication_view.xml b/res/layout-w600dp/authentication_view.xml index fc3a7fd86..d1d033403 100644 --- a/res/layout-w600dp/authentication_view.xml +++ b/res/layout-w600dp/authentication_view.xml @@ -18,23 +18,17 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - + 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"/> + 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" > - - - + 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"/>
+ android:title="@string/add_account" /> diff --git a/src/com/android/email/activity/setup/AuthenticationView.java b/src/com/android/email/activity/setup/AuthenticationView.java index 2fb944f37..60d246850 100644 --- a/src/com/android/email/activity/setup/AuthenticationView.java +++ b/src/com/android/email/activity/setup/AuthenticationView.java @@ -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();