Explorar el Código

提交分类: ui改版;
提交内容: 1、个人注册UI修改
当前版本: 测试版本6.2.9
是否冲突: 否

raomeng hace 7 años
padre
commit
18e4474ef1

+ 7 - 8
app_modular/applogin/src/main/java/com/modular/login/activity/PersonalRegActivity.java

@@ -11,7 +11,6 @@ import android.util.Log;
 import android.view.View;
 import android.widget.LinearLayout;
 import android.widget.TextView;
-import android.widget.Toast;
 
 import com.alibaba.fastjson.JSON;
 import com.common.LogUtil;
@@ -112,13 +111,13 @@ public class PersonalRegActivity extends SupportToolBarActivity {
                     if (password1 != null && password1.equals(password2)) {
                         registerJudge();
                     } else {
-                        toast("两次输入的密码不一致");
+                        showToast("两次输入的密码不一致");
                     }
                 } else {
                     if (TextUtils.isEmpty(phone)) {
-                        toast("手机号为空");
+                        showToast("手机号为空");
                     } else {
-                        toast("请填写正确的手机号");
+                        showToast("请填写正确的手机号");
                     }
                 }
             }
@@ -259,20 +258,20 @@ public class PersonalRegActivity extends SupportToolBarActivity {
                 case 0x01:
                     if (!StringUtil.isEmpty(result)) {
                         if (result.contains("resultCode") && JSON.parseObject(result).getInteger("resultCode") == 1) {
-                            Toast.makeText(ct, "注册成功", Toast.LENGTH_LONG).show();
+                            showToast("注册成功");
                             PreferenceUtils.putString(PersonalRegActivity.this, LoginActivity.PASS_WORDS, mPasswordEditText.getText().toString().trim());
                             CommonUtil.setSharedPreferences(PersonalRegActivity.this, "user_phone", mPhoneEditText.getText().toString().trim());
                             mSuccessLinearLayout.setVisibility(View.VISIBLE);
                         } else {
-                            ToastMessage(JSON.parseObject(result).getString("resultMsg"));
+                            showToast(JSON.parseObject(result).getString("resultMsg"));
                         }
                     }
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     if (JSONUtil.validate(result)) {
-                        ToastMessage(JSON.parseObject(result).getString("exceptionInfo"));
+                        showToast(JSON.parseObject(result).getString("exceptionInfo"));
                     } else {
-                        ToastMessage(result);
+                        showToast(result);
                     }
                     progressDialog.dismiss();
                     mConfirmButton.setEnabled(true);

+ 249 - 250
app_modular/applogin/src/main/res/layout/personal_reg_activity.xml

@@ -32,7 +32,6 @@
                     android:id="@+id/personal_reg_username_et"
                     style="@style/register_edittext_style"
                     android:hint="用户名"
-                    android:inputType="number"
                     android:paddingLeft="10dp"
                     android:paddingRight="10dp"
                     android:textColor="@color/black" />
@@ -187,274 +186,274 @@
     </LinearLayout>
 </FrameLayout>
 
-<!--
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              xmlns:whatever="http://schemas.android.com/apk/res-auto"
-              android:orientation="vertical"
-              android:background="@drawable/personalreg">
-
-<TextView
-    android:textSize="18sp"
-    android:textColor="@color/white"
-    android:gravity="center"
-    android:text="@string/person_register"
-    android:layout_marginTop="10dp"
-    android:layout_width="match_parent"
-    android:layout_height="35dp"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp" />
+    <!--
+    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                  android:layout_width="match_parent"
+                  android:layout_height="match_parent"
+                  xmlns:whatever="http://schemas.android.com/apk/res-auto"
+                  android:orientation="vertical"
+                  android:background="@drawable/personalreg">
 
-<LinearLayout
-    android:layout_marginTop="10dp"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp"
-    android:background="@drawable/bg_transparent_btn"
-    >
-
-    <ImageView
-        android:src="@drawable/icon_phone"
-        android:layout_width="30dp"
+    <TextView
+        android:textSize="18sp"
+        android:textColor="@color/white"
+        android:gravity="center"
+        android:text="@string/person_register"
+        android:layout_marginTop="10dp"
+        android:layout_width="match_parent"
         android:layout_height="35dp"
-        android:layout_marginLeft="5dp" />
-
-    <View
-        android:layout_gravity="center"
         android:layout_marginLeft="20dp"
-        android:layout_width="@dimen/line"
-        android:layout_height="30dp"
-        android:background="@color/white" />
+        android:layout_marginRight="20dp" />
 
-    <com.andreabaccega.widget.FormEditText
-        android:id="@+id/phone_et"
+    <LinearLayout
+        android:layout_marginTop="10dp"
         android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:hint="@string/phone_number"
-        android:background="@null"
-        android:gravity="center_vertical"
-        android:paddingLeft="50dp"
-        android:textColorHint="@color/white"
-        android:textSize="15sp"
-        android:inputType="number"
-        android:maxLength="11"
-        whatever:customRegexp="^((13[1-9])|(15[^4])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$"
-        whatever:testErrorString="请输入正确的手机号"
-        />
-</LinearLayout>
-
-<LinearLayout
-    android:layout_marginTop="10dp"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp"
-    android:background="@drawable/bg_transparent_btn"
-    >
-
-    <ImageView
-        android:src="@drawable/icon_password"
-        android:layout_width="30dp"
-        android:layout_height="35dp"
-        android:layout_marginLeft="5dp" />
-
-    <View
-        android:layout_gravity="center"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
         android:layout_marginLeft="20dp"
-        android:layout_width="@dimen/line"
-        android:layout_height="30dp"
-        android:background="@color/white" />
+        android:layout_marginRight="20dp"
+        android:background="@drawable/bg_transparent_btn"
+        >
 
-    <com.andreabaccega.widget.FormEditText
-        android:id="@+id/password_et"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:hint="@string/rpassword"
-        android:background="@null"
-        android:gravity="center_vertical"
-        android:paddingLeft="50dp"
-        android:textColorHint="@color/white"
-        android:textSize="15sp"
-        android:inputType="textPassword"
-        android:maxLength="12"
-        whatever:customRegexp="^[0-9a-zA-Z]{6,12}$"
-        whatever:testErrorString="请输入6-12位密码(仅限数字+字母组合)"
-        />
-</LinearLayout>
-
-<LinearLayout
-    android:layout_marginTop="10dp"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp"
-    android:background="@drawable/bg_transparent_btn"
-    >
-
-    <ImageView
-        android:src="@drawable/icon_name"
-        android:layout_width="30dp"
-        android:layout_height="35dp"
-        android:layout_marginLeft="5dp" />
+        <ImageView
+            android:src="@drawable/icon_phone"
+            android:layout_width="30dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="5dp" />
+
+        <View
+            android:layout_gravity="center"
+            android:layout_marginLeft="20dp"
+            android:layout_width="@dimen/line"
+            android:layout_height="30dp"
+            android:background="@color/white" />
+
+        <com.andreabaccega.widget.FormEditText
+            android:id="@+id/phone_et"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:hint="@string/phone_number"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:paddingLeft="50dp"
+            android:textColorHint="@color/white"
+            android:textSize="15sp"
+            android:inputType="number"
+            android:maxLength="11"
+            whatever:customRegexp="^((13[1-9])|(15[^4])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$"
+            whatever:testErrorString="请输入正确的手机号"
+            />
+    </LinearLayout>
 
-    <View
-        android:layout_gravity="center"
+    <LinearLayout
+        android:layout_marginTop="10dp"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
         android:layout_marginLeft="20dp"
-        android:layout_width="@dimen/line"
-        android:layout_height="30dp"
-        android:background="@color/white" />
+        android:layout_marginRight="20dp"
+        android:background="@drawable/bg_transparent_btn"
+        >
 
-    <com.andreabaccega.widget.FormEditText
-        android:id="@+id/name_et"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:hint="@string/name"
-        android:background="@null"
-        android:gravity="center_vertical"
-        android:paddingLeft="50dp"
-        android:textColorHint="@color/white"
-        android:textSize="15sp"
-        android:maxLength="12"
-        whatever:testType="regexp"
-        whatever:customRegexp="^[A-Za-z\u4e00-\u9fa5]{1,12}+$"
-        whatever:testErrorString="姓名只能为12个字符之内的中、英文"
-        />
-</LinearLayout>
-
-<LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp"
-    android:layout_marginTop="10dp"
-    android:background="@drawable/bg_transparent_btn"
-    android:orientation="horizontal"
-    android:visibility="gone">
-
-    <ImageView
-        android:layout_width="30dp"
-        android:layout_height="35dp"
-        android:layout_marginLeft="5dp"
-        android:src="@drawable/icon_male" />
+        <ImageView
+            android:src="@drawable/icon_password"
+            android:layout_width="30dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="5dp" />
+
+        <View
+            android:layout_gravity="center"
+            android:layout_marginLeft="20dp"
+            android:layout_width="@dimen/line"
+            android:layout_height="30dp"
+            android:background="@color/white" />
+
+        <com.andreabaccega.widget.FormEditText
+            android:id="@+id/password_et"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:hint="@string/rpassword"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:paddingLeft="50dp"
+            android:textColorHint="@color/white"
+            android:textSize="15sp"
+            android:inputType="textPassword"
+            android:maxLength="12"
+            whatever:customRegexp="^[0-9a-zA-Z]{6,12}$"
+            whatever:testErrorString="请输入6-12位密码(仅限数字+字母组合)"
+            />
+    </LinearLayout>
 
-    <View
-        android:layout_width="@dimen/line"
-        android:layout_height="30dp"
-        android:layout_gravity="center"
+    <LinearLayout
+        android:layout_marginTop="10dp"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
         android:layout_marginLeft="20dp"
-        android:background="@color/white" />
+        android:layout_marginRight="20dp"
+        android:background="@drawable/bg_transparent_btn"
+        >
 
-    <EditText
-        android:id="@+id/male_et"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:background="@null"
-        android:drawableRight="@drawable/icon_more"
-        android:gravity="center_vertical"
-        android:hint="@string/user_sex"
-        android:paddingLeft="50dp"
-        android:textColorHint="@color/white"
-        android:textSize="15sp" />
-
-</LinearLayout>
-
-<LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp"
-    android:layout_marginTop="10dp"
-    android:background="@drawable/bg_transparent_btn"
-    android:orientation="horizontal"
-    android:visibility="gone">
-
-    <ImageView
-        android:layout_width="30dp"
-        android:layout_height="35dp"
-        android:layout_marginLeft="5dp"
-        android:src="@drawable/icon_data" />
+        <ImageView
+            android:src="@drawable/icon_name"
+            android:layout_width="30dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="5dp" />
+
+        <View
+            android:layout_gravity="center"
+            android:layout_marginLeft="20dp"
+            android:layout_width="@dimen/line"
+            android:layout_height="30dp"
+            android:background="@color/white" />
+
+        <com.andreabaccega.widget.FormEditText
+            android:id="@+id/name_et"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:hint="@string/name"
+            android:background="@null"
+            android:gravity="center_vertical"
+            android:paddingLeft="50dp"
+            android:textColorHint="@color/white"
+            android:textSize="15sp"
+            android:maxLength="12"
+            whatever:testType="regexp"
+            whatever:customRegexp="^[A-Za-z\u4e00-\u9fa5]{1,12}+$"
+            whatever:testErrorString="姓名只能为12个字符之内的中、英文"
+            />
+    </LinearLayout>
 
-    <View
-        android:layout_width="@dimen/line"
-        android:layout_height="30dp"
-        android:layout_gravity="center"
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
         android:layout_marginLeft="20dp"
-        android:background="@color/white" />
+        android:layout_marginRight="20dp"
+        android:layout_marginTop="10dp"
+        android:background="@drawable/bg_transparent_btn"
+        android:orientation="horizontal"
+        android:visibility="gone">
 
-    <EditText
-        android:id="@+id/birthday_et"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:background="@null"
-        android:drawableRight="@drawable/icon_more"
-        android:gravity="center_vertical"
-        android:hint="@string/birthday"
-        android:paddingLeft="50dp"
-        android:textColorHint="@color/white"
-        android:textSize="15sp" />
-</LinearLayout>
-
-<LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginLeft="20dp"
-    android:layout_marginRight="20dp"
-    android:layout_marginTop="10dp"
-    android:background="@drawable/bg_transparent_btn"
-    android:orientation="horizontal"
-    android:visibility="gone">
-
-    <ImageView
-        android:layout_width="30dp"
-        android:layout_height="35dp"
-        android:layout_marginLeft="5dp"
-        android:src="@drawable/icon_writing" />
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="5dp"
+            android:src="@drawable/icon_male" />
+
+        <View
+            android:layout_width="@dimen/line"
+            android:layout_height="30dp"
+            android:layout_gravity="center"
+            android:layout_marginLeft="20dp"
+            android:background="@color/white" />
+
+        <EditText
+            android:id="@+id/male_et"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:background="@null"
+            android:drawableRight="@drawable/icon_more"
+            android:gravity="center_vertical"
+            android:hint="@string/user_sex"
+            android:paddingLeft="50dp"
+            android:textColorHint="@color/white"
+            android:textSize="15sp" />
+
+    </LinearLayout>
 
-    <EditText
-        android:id="@+id/person_sign_et"
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="65dp"
-        android:background="@null"
-        android:gravity="left|top"
-        android:hint="@string/input_person_sign"
-        android:maxLength="15"
-        android:padding="10dp"
-        android:textColorHint="@color/white"
-        android:textSize="15sp" />
-</LinearLayout>
-
-<LinearLayout
-    android:layout_marginTop="10dp"
-    android:id="@+id/ly_bottom_submit"
-    style="@style/form_linear_customer"
-    android:background="@null">
-
-    <Button
-        android:id="@+id/register_btn"
-        android:layout_marginTop="10dp"
+        android:layout_height="wrap_content"
         android:layout_marginLeft="20dp"
         android:layout_marginRight="20dp"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:layout_marginBottom="10dp"
-        android:padding="10dp"
-        android:textColor="@color/black"
-        android:textSize="@dimen/text_main"
-        android:text="@string/register"
-        android:background="@drawable/bg_white_btn" />
+        android:layout_marginTop="10dp"
+        android:background="@drawable/bg_transparent_btn"
+        android:orientation="horizontal"
+        android:visibility="gone">
 
-    <TextView
-        android:id="@+id/to_login_tv"
-        android:padding="5dp"
-        android:layout_gravity="center_horizontal"
-        android:layout_width="wrap_content"
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="5dp"
+            android:src="@drawable/icon_data" />
+
+        <View
+            android:layout_width="@dimen/line"
+            android:layout_height="30dp"
+            android:layout_gravity="center"
+            android:layout_marginLeft="20dp"
+            android:background="@color/white" />
+
+        <EditText
+            android:id="@+id/birthday_et"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:background="@null"
+            android:drawableRight="@drawable/icon_more"
+            android:gravity="center_vertical"
+            android:hint="@string/birthday"
+            android:paddingLeft="50dp"
+            android:textColorHint="@color/white"
+            android:textSize="15sp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:text="@string/to_login"
-        android:textColor="@color/yellow" />
-</LinearLayout>
-</LinearLayout>-->
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="20dp"
+        android:layout_marginTop="10dp"
+        android:background="@drawable/bg_transparent_btn"
+        android:orientation="horizontal"
+        android:visibility="gone">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="35dp"
+            android:layout_marginLeft="5dp"
+            android:src="@drawable/icon_writing" />
+
+        <EditText
+            android:id="@+id/person_sign_et"
+            android:layout_width="match_parent"
+            android:layout_height="65dp"
+            android:background="@null"
+            android:gravity="left|top"
+            android:hint="@string/input_person_sign"
+            android:maxLength="15"
+            android:padding="10dp"
+            android:textColorHint="@color/white"
+            android:textSize="15sp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_marginTop="10dp"
+        android:id="@+id/ly_bottom_submit"
+        style="@style/form_linear_customer"
+        android:background="@null">
+
+        <Button
+            android:id="@+id/register_btn"
+            android:layout_marginTop="10dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:layout_marginBottom="10dp"
+            android:padding="10dp"
+            android:textColor="@color/black"
+            android:textSize="@dimen/text_main"
+            android:text="@string/register"
+            android:background="@drawable/bg_white_btn" />
+
+        <TextView
+            android:id="@+id/to_login_tv"
+            android:padding="5dp"
+            android:layout_gravity="center_horizontal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/to_login"
+            android:textColor="@color/yellow" />
+    </LinearLayout>
+    </LinearLayout>-->