瀏覽代碼

rebase fixing plus proper theming of legacy login fields

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 6 年之前
父節點
當前提交
f53f246f6e

+ 0 - 1
src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -56,7 +56,6 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
 import com.nextcloud.client.account.UserAccountManager;
 import com.nextcloud.client.di.Injectable;
 import com.nextcloud.client.preferences.AppPreferences;
-import com.nextcloud.client.preferences.PreferenceManager;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.lib.common.utils.Log_OC;

+ 31 - 26
src/main/res/layout-land/account_setup.xml

@@ -85,12 +85,15 @@
 	        		android:id="@+id/hostUrlFrame"
 					android:layout_width="match_parent"
 					android:layout_height="wrap_content"
-					android:layout_marginBottom="@dimen/zero">
+					android:layout_marginBottom="@dimen/zero"
+                    android:background="@color/primary">
 
                     <com.google.android.material.textfield.TextInputLayout
                         android:id="@+id/input_layout_hostUrl"
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
+                        android:layout_height="wrap_content"
+                        app:boxBackgroundColor="@color/primary"
+                        app:hintTextColor="@color/fg_inverse">
 
                         <com.owncloud.android.ui.components.CustomEditText
                             android:id="@+id/hostUrlInput"
@@ -105,7 +108,7 @@
                             android:paddingStart="@dimen/zero"
                             android:paddingLeft="@dimen/zero"
                             android:textColor="@color/login_text_color"
-                            android:textColorHint="@color/login_text_hint_color">
+                            android:theme="@style/Nextcloud.EditText.Login">
 
                             <requestFocus/>
                         </com.owncloud.android.ui.components.CustomEditText>
@@ -159,44 +162,46 @@
                     android:contentDescription="@string/auth_testing_connection"/>
 
                 <com.google.android.material.textfield.TextInputLayout
-					android:id="@+id/input_layout_account_username"
-					android:layout_width="match_parent"
-					android:layout_height="wrap_content"
-					android:visibility="gone">
-
-				<com.google.android.material.textfield.TextInputEditText
-                    android:id="@+id/account_username"
+                    android:id="@+id/input_layout_account_username"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:ems="10"
-                    android:hint="@string/auth_username"
-                    android:inputType="textNoSuggestions"
-                    android:textColor="@color/login_text_color"
-                    android:textColorHint="@color/login_text_hint_color"
-                    android:autofillHints="username"/>
+                    app:boxBackgroundColor="@color/primary"
+                    app:hintTextColor="@color/fg_inverse"
+                    android:visibility="gone">
 
+                    <com.google.android.material.textfield.TextInputEditText
+                        android:id="@+id/account_username"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:autofillHints="username"
+                        android:ems="10"
+                        android:hint="@string/auth_username"
+                        android:inputType="textNoSuggestions"
+                        android:textColor="@color/login_text_color"
+                        android:textColorHint="@color/login_text_hint_color" />
                 </com.google.android.material.textfield.TextInputLayout>
 
                 <com.google.android.material.textfield.TextInputLayout
-					android:id="@+id/input_layout_account_password"
-					android:layout_width="match_parent"
-					android:layout_height="wrap_content"
-					android:visibility="gone"
-					app:passwordToggleDrawable="@drawable/password_visibility_selector"
-					app:passwordToggleTint="@color/login_btn_tint">
+                    android:id="@+id/input_layout_account_password"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    app:boxBackgroundColor="@color/primary"
+                    app:hintTextColor="@color/fg_inverse"
+                    android:visibility="gone"
+                    app:passwordToggleDrawable="@drawable/password_visibility_selector"
+                    app:passwordToggleTint="@color/login_text_hint_color">
 
                     <com.google.android.material.textfield.TextInputEditText
                         android:id="@+id/account_password"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
+                        android:autofillHints="password"
                         android:drawablePadding="@dimen/alternate_half_padding"
                         android:ems="10"
                         android:hint="@string/auth_password"
                         android:inputType="textPassword"
                         android:textColor="@color/login_text_color"
-                        android:textColorHint="@color/login_text_hint_color"
-                        android:autofillHints="password"/>
-
+                        android:textColorHint="@color/login_text_hint_color" />
                 </com.google.android.material.textfield.TextInputLayout>
 
                 <TextView
@@ -218,7 +223,7 @@
     </LinearLayout>
 
     <LinearLayout
-        android:id="@id/bottom_block"
+        android:id="@+id/bottom_block"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
 		android:layout_alignParentBottom="true"

+ 20 - 17
src/main/res/layout/account_setup.xml

@@ -152,31 +152,33 @@
                 android:text="@string/auth_testing_connection"
                 android:textColor="@color/login_text_color" />
 
-            <CheckBox
-                android:id="@+id/oauth_onOff_check"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:checked="false"
-                android:contentDescription="@string/oauth_check_onoff"
-                android:onClick="onCheckClick"
-                android:text="@string/oauth_check_onoff"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:textColor="@color/login_text_hint_color" />
-
             <com.google.android.material.textfield.TextInputLayout
-                android:id="@+id/input_layout_oAuthEntryPoint_1"
-                android:layout_width="114dp"
-                android:layout_height="wrap_content">
-
+                android:id="@+id/input_layout_account_username"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:boxBackgroundColor="@color/primary"
+                app:hintTextColor="@color/fg_inverse"
+                android:visibility="gone">
 
+                <com.google.android.material.textfield.TextInputEditText
+                    android:id="@+id/account_username"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:autofillHints="username"
+                    android:ems="10"
+                    android:hint="@string/auth_username"
+                    android:inputType="textNoSuggestions"
+                    android:textColor="@color/login_text_color"
+                    android:theme="@style/Nextcloud.EditText.Login"
+                    android:textColorHint="@color/login_text_hint_color" />
             </com.google.android.material.textfield.TextInputLayout>
 
             <com.google.android.material.textfield.TextInputLayout
-
                 android:id="@+id/input_layout_account_password"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:theme="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
+                app:boxBackgroundColor="@color/primary"
+                app:hintTextColor="@color/fg_inverse"
                 android:visibility="gone"
                 app:passwordToggleDrawable="@drawable/password_visibility_selector"
                 app:passwordToggleTint="@color/login_text_hint_color">
@@ -191,6 +193,7 @@
                     android:hint="@string/auth_password"
                     android:inputType="textPassword"
                     android:textColor="@color/login_text_color"
+                    android:theme="@style/Nextcloud.EditText.Login"
                     android:textColorHint="@color/login_text_hint_color" />
             </com.google.android.material.textfield.TextInputLayout>