Просмотр исходного кода

修复登录与注册中用户名与密码规则不一样的bug

zengjiebin лет назад: 7
Родитель
Сommit
71a9e8db04

+ 2 - 4
app/src/main/res/layout/fragment_sign_in.xml

@@ -24,8 +24,7 @@
 
         <EditText
             android:id="@+id/user_name_box"
-            style="@style/login_edit_style"
-            android:digits="@string/digits_username"
+            style="@style/login_edit_style_name"
             android:hint="请输入用户名/手机号"
             android:maxLength="20"
             android:paddingLeft="@dimen/content_padding_5" />
@@ -36,9 +35,8 @@
 
         <EditText
             android:id="@+id/password_box"
-            style="@style/login_edit_style"
+            style="@style/login_edit_style_pwd"
             android:layout_below="@+id/user_name_box"
-            android:digits="@string/digits_password"
             android:hint="请输入密码(6-16位)"
             android:inputType="textPassword"
             android:maxLength="16"

+ 3 - 3
app/src/main/res/layout/fragment_sign_up.xml

@@ -12,7 +12,7 @@
 
         <EditText
             android:id="@+id/user_name_box"
-            style="@style/login_edit_style"
+            style="@style/login_edit_style_name"
             android:maxLength="20"
             android:hint="输入用户名(如邮箱地址、常用英文等唯一标识)" />
 
@@ -26,7 +26,7 @@
             <EditText
                 android:id="@+id/password_box"
                 android:layout_weight="1"
-                style="@style/login_edit_style"
+                style="@style/login_edit_style_pwd"
                 android:hint="输入密码(6-16位)"
                 android:inputType="textPassword"
                 android:lines="1"
@@ -50,7 +50,7 @@
             <EditText
                 android:id="@+id/password_box2"
                 android:layout_weight="1"
-                style="@style/login_edit_style"
+                style="@style/login_edit_style_pwd"
                 android:hint="确认密码"
                 android:inputType="textPassword"
                 android:lines="1"

+ 1 - 1
app/src/main/res/values/str_public_strings.xml

@@ -8,7 +8,7 @@
     <!--digits-->
     <string name="digits_username">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
     <string name="digits_captcha">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
-    <string name="digits_password">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~@#$%^*()-=_+</string>
+    <string name="digits_password">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~@#$%^*()-=_+.</string>
 
     <!--img desc-->
 

+ 6 - 0
app/src/main/res/values/styles.xml

@@ -62,6 +62,12 @@
         <item name="android:textSize">@dimen/text_size_13</item>
         <item name="android:textColor">@color/black_6_3</item>
     </style>
+    <style name="login_edit_style_name" parent="login_edit_style">
+        <item name="android:digits">@string/digits_username</item>
+    </style>
+    <style name="login_edit_style_pwd" parent="login_edit_style">
+        <item name="android:digits">@string/digits_password</item>
+    </style>
 
     <style name="login_separetor_line_style">
         <item name="android:layout_width">match_parent</item>