瀏覽代碼

Use containerized text input field styling

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

+ 6 - 2
src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java

@@ -61,10 +61,13 @@ import android.widget.TextView;
 import android.widget.Toast;
 
 import com.google.android.material.button.MaterialButton;
+import com.google.android.material.textfield.TextInputEditText;
+import com.google.android.material.textfield.TextInputLayout;
 import com.nextcloud.client.di.Injectable;
 import com.nextcloud.client.preferences.AppPreferences;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
+import com.owncloud.android.databinding.UploadFileDialogBinding;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.services.FileUploader;
 import com.owncloud.android.lib.common.operations.RemoteOperation;
@@ -408,10 +411,11 @@ public class ReceiveExternalFilesActivity extends FileActivity
                 mFileCategory = CATEGORY_MAPS_URL;
             }
 
-            final EditText userInput = view.findViewById(R.id.user_input);
+            final TextInputEditText userInput = view.findViewById(R.id.user_input);
+            final TextInputLayout userInputContainer = view.findViewById(R.id.user_input_container);
             setFilename(userInput, selectPos);
-            userInput.setHighlightColor(ThemeUtils.primaryColor(getContext()));
             userInput.requestFocus();
+            ThemeUtils.colorTextInput(userInputContainer, userInput, ThemeUtils.primaryColor(getContext()));
 
             final Spinner spinner = view.findViewById(R.id.file_type);
             setupSpinner(adapter, selectPos, userInput, spinner);

+ 11 - 9
src/main/java/com/owncloud/android/ui/dialog/CreateFolderDialogFragment.java

@@ -33,6 +33,8 @@ import android.widget.EditText;
 import android.widget.TextView;
 
 import com.owncloud.android.R;
+import com.owncloud.android.databinding.EditBoxDialogBinding;
+import com.owncloud.android.databinding.NoteDialogBinding;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.ui.activity.ComponentsGetter;
@@ -56,6 +58,7 @@ public class CreateFolderDialogFragment
     public static final String CREATE_FOLDER_FRAGMENT = "CREATE_FOLDER_FRAGMENT";
 
     private OCFile mParentFolder;
+    private EditBoxDialogBinding binding;
 
     /**
      * Public factory method to create new CreateFolderDialogFragment instances.
@@ -87,23 +90,22 @@ public class CreateFolderDialogFragment
     @NonNull
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
-        int accentColor = ThemeUtils.primaryAccentColor(getContext());
+        int primaryColor = ThemeUtils.primaryColor(getActivity());
         mParentFolder = getArguments().getParcelable(ARG_PARENT_FOLDER);
 
         // Inflate the layout for the dialog
-        LayoutInflater inflater = getActivity().getLayoutInflater();
-        View v = inflater.inflate(R.layout.edit_box_dialog, null);
+        LayoutInflater inflater = requireActivity().getLayoutInflater();
+        binding = EditBoxDialogBinding.inflate(inflater, null, false);
+        View view = binding.getRoot();
 
         // Setup layout
-        EditText inputText = v.findViewById(R.id.user_input);
-        inputText.setText("");
-        inputText.requestFocus();
-        inputText.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP);
-        inputText.setHighlightColor(ThemeUtils.primaryColor(getActivity()));
+        binding.userInput.setText("");
+        binding.userInput.requestFocus();
+        ThemeUtils.colorTextInput(binding.userInputContainer, binding.userInput, primaryColor);
 
         // Build the dialog
         AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
-        builder.setView(v)
+        builder.setView(view)
                 .setPositiveButton(R.string.folder_confirm_create, this)
                 .setNegativeButton(R.string.common_cancel, this)
                 .setTitle(R.string.uploader_info_dirname);

+ 2 - 3
src/main/java/com/owncloud/android/ui/dialog/NoteDialogFragment.java

@@ -88,7 +88,7 @@ public class NoteDialogFragment extends DialogFragment implements DialogInterfac
     @NonNull
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
-        int accentColor = ThemeUtils.primaryAccentColor(getContext());
+        int primaryColor = ThemeUtils.primaryColor(getContext());
 
         // Inflate the layout for the dialog
         LayoutInflater inflater = requireActivity().getLayoutInflater();
@@ -97,9 +97,8 @@ public class NoteDialogFragment extends DialogFragment implements DialogInterfac
 
         // Setup layout
         binding.noteText.setText(share.getNote());
-        binding.noteText.setHighlightColor(ThemeUtils.primaryColor(getActivity()));
         binding.noteText.requestFocus();
-        ThemeUtils.colorTextInputLayout(binding.noteContainer, accentColor);
+        ThemeUtils.colorTextInput(binding.noteContainer, binding.noteText, primaryColor);
 
         // Build the dialog
         AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());

+ 6 - 8
src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java

@@ -95,7 +95,6 @@ public class RenameFileDialogFragment
     @NonNull
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
-        int accentColor = ThemeUtils.primaryAccentColor(getContext());
         mTargetFile = requireArguments().getParcelable(ARG_TARGET_FILE);
 
         // Inflate the layout for the dialog
@@ -105,16 +104,15 @@ public class RenameFileDialogFragment
 
         // Setup layout
         String currentName = mTargetFile.getFileName();
-        EditText inputText = binding.userInput;
-        inputText.setHighlightColor(ThemeUtils.primaryColor(getActivity()));
-        inputText.setText(currentName);
-        ThemeUtils.themeEditText(getContext(), inputText, false);
+        binding.userInput.setText(currentName);
+        ThemeUtils.colorTextInput(binding.userInputContainer,
+                                  binding.userInput,
+                                  ThemeUtils.primaryColor(getActivity()));
         int selectionStart = 0;
         int extensionStart = mTargetFile.isFolder() ? -1 : currentName.lastIndexOf('.');
         int selectionEnd = extensionStart >= 0 ? extensionStart : currentName.length();
-        inputText.setSelection(Math.min(selectionStart, selectionEnd), Math.max(selectionStart, selectionEnd));
-        inputText.requestFocus();
-        inputText.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP);
+        binding.userInput.setSelection(Math.min(selectionStart, selectionEnd), Math.max(selectionStart, selectionEnd));
+        binding.userInput.requestFocus();
 
         // Build the dialog
         AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());

+ 10 - 12
src/main/java/com/owncloud/android/ui/dialog/SharePasswordDialogFragment.java

@@ -22,14 +22,12 @@ package com.owncloud.android.ui.dialog;
 
 import android.app.Dialog;
 import android.content.DialogInterface;
-import android.graphics.PorterDuff;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.Window;
 import android.view.WindowManager;
-import android.widget.EditText;
 
 import com.owncloud.android.R;
 import com.owncloud.android.databinding.PasswordDialogBinding;
@@ -67,10 +65,12 @@ public class SharePasswordDialogFragment extends DialogFragment implements Dialo
         super.onStart();
 
         AlertDialog alertDialog = (AlertDialog) getDialog();
-        alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(ThemeUtils.primaryAccentColor(getContext()));
-        alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(ThemeUtils.primaryAccentColor(getContext()));
-        alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)
+        if (alertDialog != null) {
+            alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(ThemeUtils.primaryAccentColor(getContext()));
+            alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(ThemeUtils.primaryAccentColor(getContext()));
+            alertDialog.getButton(AlertDialog.BUTTON_NEUTRAL)
                 .setTextColor(getResources().getColor(R.color.highlight_textColor_Warning));
+        }
     }
 
     /**
@@ -135,13 +135,11 @@ public class SharePasswordDialogFragment extends DialogFragment implements Dialo
         View view = binding.getRoot();
 
         // Setup layout
-        EditText inputText = binding.sharePassword;
-        inputText.setHighlightColor(ThemeUtils.primaryColor(getActivity()));
-        inputText.setText("");
-        ThemeUtils.themeEditText(getContext(), inputText, false);
-        inputText.requestFocus();
-        inputText.getBackground().setColorFilter(ThemeUtils.primaryAccentColor(getContext()),
-                                                 PorterDuff.Mode.SRC_ATOP);
+        binding.sharePassword.setText("");
+        ThemeUtils.colorTextInput(binding.sharePasswordContainer,
+                                  binding.sharePassword,
+                                  ThemeUtils.primaryColor(getActivity()));
+        binding.sharePassword.requestFocus();
 
         int title;
         if (askForPassword) {

+ 3 - 6
src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java

@@ -170,14 +170,11 @@ public class FileDetailActivitiesFragment extends Fragment implements
             }
         };
 
-        binding.commentInputField.getBackground().setColorFilter(
-                ThemeUtils.primaryAccentColor(getContext()),
-                PorterDuff.Mode.SRC_ATOP
-        );
-
         binding.submitComment.setOnClickListener(v -> submitComment());
 
-        ThemeUtils.themeEditText(getContext(), binding.commentInputField, false);
+        ThemeUtils.colorTextInput(binding.commentInputFieldContainer,
+                                  binding.commentInputField,
+                                  ThemeUtils.primaryColor(getContext()));
 
         return view;
     }

+ 15 - 1
src/main/java/com/owncloud/android/utils/ThemeUtils.java

@@ -49,6 +49,7 @@ import android.widget.TextView;
 import com.google.android.material.button.MaterialButton;
 import com.google.android.material.floatingactionbutton.FloatingActionButton;
 import com.google.android.material.snackbar.Snackbar;
+import com.google.android.material.textfield.TextInputEditText;
 import com.google.android.material.textfield.TextInputLayout;
 import com.nextcloud.client.account.User;
 import com.nextcloud.client.account.UserAccountManagerImpl;
@@ -520,13 +521,26 @@ public final class ThemeUtils {
         colorStatusBar(fragmentActivity, primaryAppbarColor(fragmentActivity));
     }
 
+    /**
+     * Sets the color of the (containerized) text input TextInputLayout to {@code color} for hint text, box stroke and
+     * highlight color.
+     *
+     * @param textInputLayout   the TextInputLayout instance
+     * @param textInputEditText the TextInputEditText child element
+     * @param color             the color to be used for the hint text and box stroke
+     */
+    public static void colorTextInput(TextInputLayout textInputLayout, TextInputEditText textInputEditText, int color) {
+        textInputEditText.setHighlightColor(color);
+        colorTextInputLayout(textInputLayout, color);
+    }
+
     /**
      * Sets the color of the  TextInputLayout to {@code color} for hint text and box stroke.
      *
      * @param textInputLayout the TextInputLayout instance
      * @param color           the color to be used for the hint text and box stroke
      */
-    public static void colorTextInputLayout(TextInputLayout textInputLayout, int color) {
+    private static void colorTextInputLayout(TextInputLayout textInputLayout, int color) {
         textInputLayout.setBoxStrokeColor(color);
         textInputLayout.setDefaultHintTextColor(new ColorStateList(
             new int[][]{

+ 26 - 16
src/main/res/layout/edit_box_dialog.xml

@@ -1,36 +1,46 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-    ownCloud Android client application
+    Nextcloud Android client application
 
-    Copyright (C) 2012  Bartek Przybylski
-    Copyright (C) 2015 ownCloud Inc.
+    @author Andy Scherzinger
+    Copyright (C) 2021 Andy Scherzinger
 
     This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2,
-    as published by the Free Software Foundation.
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-    GNU General Public License for more details.
+    GNU Affero General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+    You should have received a copy of the GNU Affero General Public License
+    along with this program. If not, see <http://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:gravity="clip_horizontal"
-    android:orientation="vertical"
     android:padding="@dimen/standard_padding">
 
-    <com.google.android.material.textfield.TextInputEditText
-        android:id="@+id/user_input"
+    <com.google.android.material.textfield.TextInputLayout
+        android:id="@+id/user_input_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:ems="10"
-        android:hint="@string/hint_name"
-        android:importantForAutofill="no"
-        android:inputType="textNoSuggestions|textCapSentences"/>
+        android:hint="@string/hint_name">
+
+        <com.google.android.material.textfield.TextInputEditText
+            android:id="@+id/user_input"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:ems="10"
+            android:gravity="top"
+            android:importantForAutofill="no"
+            android:inputType="textNoSuggestions|textCapSentences"
+            android:scrollbars="vertical">
+
+        </com.google.android.material.textfield.TextInputEditText>
+
+    </com.google.android.material.textfield.TextInputLayout>
 
 </LinearLayout>

+ 16 - 6
src/main/res/layout/file_details_activities_fragment.xml

@@ -31,14 +31,24 @@
         android:layout_marginEnd="@dimen/zero"
         android:orientation="horizontal">
 
-        <com.google.android.material.textfield.TextInputEditText
-            android:id="@+id/commentInputField"
+        <com.google.android.material.textfield.TextInputLayout
+            android:id="@+id/commentInputField_container"
             android:layout_width="0dp"
-            android:layout_height="@dimen/minimum_size_for_touchable_area"
+            android:layout_height="wrap_content"
             android:layout_weight="1"
-            android:hint="@string/new_comment"
-            android:layout_marginTop="@dimen/standard_half_margin"
-            android:textColorHint="@color/secondary_text_color" />
+            android:paddingTop="@dimen/standard_padding"
+            android:hint="@string/new_comment">
+
+            <com.google.android.material.textfield.TextInputEditText
+                android:id="@+id/commentInputField"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:inputType="textNoSuggestions|textCapSentences"
+                android:scrollbars="vertical">
+
+            </com.google.android.material.textfield.TextInputEditText>
+
+        </com.google.android.material.textfield.TextInputLayout>
 
         <com.google.android.material.button.MaterialButton
             android:id="@+id/submitComment"

+ 0 - 1
src/main/res/layout/note_dialog.xml

@@ -30,7 +30,6 @@
         android:id="@+id/note_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        style="@style/TextInputLayout"
         android:hint="@string/hint_note">
 
         <com.google.android.material.textfield.TextInputEditText

+ 25 - 17
src/main/res/layout/password_dialog.xml

@@ -1,37 +1,45 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-    ownCloud Android client application
+    Nextcloud Android client application
 
-    Copyright (C) 2015 ownCloud Inc.
+    @author Andy Scherzinger
+    Copyright (C) 2021 Andy Scherzinger
 
     This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License version 2,
-    as published by the Free Software Foundation.
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-    GNU General Public License for more details.
+    GNU Affero General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+    You should have received a copy of the GNU Affero General Public License
+    along with this program. If not, see <http://www.gnu.org/licenses/>.
 -->
-
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:gravity="clip_horizontal"
-    android:orientation="vertical"
     android:padding="@dimen/standard_padding">
 
-    <com.google.android.material.textfield.TextInputEditText
-        android:id="@+id/share_password"
+    <com.google.android.material.textfield.TextInputLayout
+        android:id="@+id/share_password_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:ems="10"
-        android:hint="@string/hint_password"
-        android:inputType="textPassword"
-        android:autofillHints="password"
-        android:textColorHint="@color/bg_fallback_highlight"></com.google.android.material.textfield.TextInputEditText>
+        android:hint="@string/hint_password">
+
+        <com.google.android.material.textfield.TextInputEditText
+            android:id="@+id/share_password"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:autofillHints="password"
+            android:ems="10"
+            android:gravity="top"
+            android:inputType="textPassword">
+
+        </com.google.android.material.textfield.TextInputEditText>
+
+    </com.google.android.material.textfield.TextInputLayout>
 
 </LinearLayout>

+ 18 - 6
src/main/res/layout/upload_file_dialog.xml

@@ -33,19 +33,31 @@
         android:text="@string/upload_file_dialog_filename"
         tools:text="@string/upload_file_dialog_filename"/>
 
-    <com.google.android.material.textfield.TextInputEditText
-        android:id="@+id/user_input"
+    <com.google.android.material.textfield.TextInputLayout
+        android:id="@+id/user_input_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:ems="10"
-        android:hint="@string/hint_name"
-        android:importantForAutofill="no"
-        android:inputType="textNoSuggestions|textCapSentences"/>
+        android:hint="@string/hint_name">
+
+        <com.google.android.material.textfield.TextInputEditText
+            android:id="@+id/user_input"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:ems="10"
+            android:gravity="top"
+            android:importantForAutofill="no"
+            android:inputType="textNoSuggestions|textCapSentences"
+            android:scrollbars="vertical">
+
+        </com.google.android.material.textfield.TextInputEditText>
+
+    </com.google.android.material.textfield.TextInputLayout>
 
     <TextView
         android:id="@+id/label_file_type"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/standard_margin"
         android:text="@string/upload_file_dialog_filetype"
         tools:text="@string/upload_file_dialog_filetype"/>
 

+ 19 - 4
src/main/res/values/styles.xml

@@ -38,6 +38,7 @@
         <item name="android:actionModeBackground">@color/action_mode_background</item>
         <item name="android:datePickerDialogTheme">@style/FallbackDatePickerDialogTheme</item>
         <item name="android:navigationBarColor">@color/bg_default</item>
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
     </style>
 
     <style name="Theme.ownCloud" parent="BaseTheme.ownCloud" />
@@ -54,10 +55,23 @@
         <item name="android:actionModeBackground">@color/action_mode_background</item>
         <item name="android:datePickerDialogTheme">@style/FallbackDatePickerDialogTheme</item>
         <item name="android:navigationBarColor">@color/bg_default</item>
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
     </style>
 
     <style name="FallbackThemingTheme" parent="FallbackThemingThemeBase" />
 
+    <style name="Widget.App.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
+        <item name="materialThemeOverlay">@style/ThemeOverlay.App.TextInputLayout</item>
+        <item name="hintTextColor">?attr/colorOnSurface</item>
+    </style>
+
+    <style name="ThemeOverlay.App.TextInputLayout" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox">
+        <item name="colorPrimary">@color/text_color</item>
+        <item name="colorOnSurface">@color/text_color</item>
+        <item name="colorError">@color/hwSecurityRed</item>
+        <item name="editTextStyle">@style/Widget.MaterialComponents.TextInputEditText.OutlinedBox</item>
+    </style>
+
 	<style name="FallbackDatePickerDialogTheme" parent="Theme.MaterialComponents.DayNight.Dialog.Alert">
         <item name="colorPrimary">@color/bg_default</item>
         <item name="android:textAllCaps">false</item>
@@ -80,7 +94,7 @@
         <item name="windowNoTitle">false</item>
         <item name="android:windowBackground">@color/bg_default</item>
         <item name="android:textAllCaps">false</item>
-
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
         <item name="android:buttonBarButtonStyle">@style/FallbackTheming.Dialog.ButtonStyle</item>
 	</style>
 
@@ -103,6 +117,7 @@
         <item name="windowActionBar">false</item>
         <item name="windowActionModeOverlay">true</item>
         <item name="windowNoTitle">true</item>
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
     </style>
 
     <style name="Theme.ownCloud.ToolbarBase" parent="BaseTheme.ownCloud.Toolbar">
@@ -138,11 +153,13 @@
 		<item name="searchViewStyle">@style/ownCloud.SearchView</item>
         <item name="android:textAllCaps">false</item>
         <item name="android:windowBackground">@color/bg_default</item>
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
     </style>
 
 	<style name="ownCloud.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog">
 		<item name="searchViewStyle">@style/ownCloud.SearchView</item>
         <item name="android:textAllCaps">false</item>
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
 	</style>
 
 	<style name="ProgressDialogTheme" parent="ownCloud.Dialog">
@@ -273,6 +290,7 @@
 		<item name="colorAccent">@color/color_accent</item>
         <item name="android:windowBackground">@color/bg_default</item>
         <item name="android:textAllCaps">false</item>
+        <item name="textInputStyle">@style/Widget.App.TextInputLayout</item>
     </style>
 
 	<style name="Theme.ownCloud.Dialog.NoTitle" parent="@style/Theme.ownCloud.Dialog">
@@ -328,9 +346,6 @@
         <item name="editTextStyle">@style/Widget.MaterialComponents.TextInputEditText.OutlinedBox</item>
     </style>
 
-	<style name="TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
-    </style>
-
     <style name="TextInputLayoutLogin" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
         <item name="boxStrokeColor">@color/white</item>
         <item name="boxStrokeErrorColor">@color/white</item>