From c9e527c6eab1367389ecaec56d5fe7c4bd7c34bd Mon Sep 17 00:00:00 2001 From: JevinHu Date: Sat, 23 May 2020 03:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=99=BB=E5=BD=95=E6=B3=A8?= =?UTF-8?q?=E5=86=8CUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 + .../pocket/ui/login/LoginActivity.java | 3 +- .../pocket/ui/register/RegisterActivity.java | 6 +- .../pocket/ui/resetpwd/ResetPwdStep1.java | 3 +- .../pocket/ui/resetpwd/ResetPwdStep2.java | 5 +- .../pocket/ui/resetpwd/ResetPwdStep3.java | 3 +- app/src/main/res/drawable/bg_round_main.xml | 6 + app/src/main/res/layout/activity_login.xml | 118 ++++++---- app/src/main/res/layout/activity_register.xml | 215 ++++++++++-------- .../main/res/layout/resetpwd/layout/step1.xml | 73 +++--- .../main/res/layout/resetpwd/layout/step2.xml | 86 ++++--- .../main/res/layout/resetpwd/layout/step3.xml | 71 +++--- app/src/main/res/mipmap-mdpi/bg_login.png | Bin 0 -> 229030 bytes app/src/main/res/mipmap-mdpi/ic_clock.png | Bin 0 -> 2066 bytes app/src/main/res/mipmap-mdpi/ic_email.png | Bin 0 -> 1969 bytes app/src/main/res/mipmap-mdpi/ic_register.png | Bin 0 -> 3919 bytes app/src/main/res/mipmap-mdpi/ic_tel.png | Bin 0 -> 2192 bytes app/src/main/res/mipmap-mdpi/ic_user.png | Bin 0 -> 4462 bytes 18 files changed, 368 insertions(+), 223 deletions(-) create mode 100644 app/src/main/res/drawable/bg_round_main.xml create mode 100644 app/src/main/res/mipmap-mdpi/bg_login.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_clock.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_email.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_register.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_tel.png create mode 100644 app/src/main/res/mipmap-mdpi/ic_user.png diff --git a/app/build.gradle b/app/build.gradle index 78d4add..434d676 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -121,4 +121,6 @@ dependencies { implementation 'com.youth.banner:banner:2.0.7' implementation 'de.hdodenhof:circleimageview:3.1.0' + implementation 'com.rengwuxian.materialedittext:library:2.1.4' + } diff --git a/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java b/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java index 7af6e26..b17b3c4 100644 --- a/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java +++ b/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java @@ -10,6 +10,7 @@ import android.text.TextWatcher; import android.view.View; import android.widget.Button; import android.widget.EditText; +import android.widget.LinearLayout; import android.widget.ProgressBar; import androidx.annotation.RequiresApi; @@ -70,7 +71,7 @@ public class LoginActivity extends BaseActivity { private ProgressBar loadingProgressBar; @ViewInject(R.id.login_layout) - private ConstraintLayout layout; + private LinearLayout layout; private MutableLiveData bool = new MutableLiveData<>(); diff --git a/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java b/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java index e2f85ec..4b8ad13 100644 --- a/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java +++ b/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java @@ -6,8 +6,8 @@ import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.View; -import android.widget.Button; import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.Nullable; import androidx.lifecycle.Observer; @@ -55,7 +55,7 @@ public class RegisterActivity extends BaseActivity { //注册按钮 @ViewInject(R.id.register) - private Button registerButton; + private TextView registerButton; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -136,7 +136,7 @@ public class RegisterActivity extends BaseActivity { @Event(value = R.id.back) private void back(View v) { - startActivity(new Intent(this, LoginActivity.class)); +// startActivity(new Intent(this, LoginActivity.class)); finish(); } } diff --git a/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep1.java b/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep1.java index 5ac29d5..03ce712 100644 --- a/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep1.java +++ b/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep1.java @@ -9,6 +9,7 @@ import android.text.TextWatcher; import android.view.View; import android.widget.Button; import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -46,7 +47,7 @@ public class ResetPwdStep1 extends BaseFragment { private ResetPwdViewModel resetPwdViewModel; @ViewInject(R.id.next) - private Button resetpwdButton; + private TextView resetpwdButton; @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { diff --git a/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep2.java b/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep2.java index 7c36e3d..1ecee41 100644 --- a/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep2.java +++ b/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep2.java @@ -7,6 +7,7 @@ import android.text.TextWatcher; import android.view.View; import android.widget.Button; import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -45,11 +46,11 @@ public class ResetPwdStep2 extends BaseFragment { //发送验证码按钮 @ViewInject(R.id.sendcode) - private Button sendCode; + private TextView sendCode; //下一步按钮 @ViewInject(R.id.next) - private Button next; + private TextView next; private ResetPwdViewModel resetPwdViewModel; diff --git a/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep3.java b/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep3.java index ff79e4a..eafa501 100644 --- a/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep3.java +++ b/app/src/main/java/com/community/pocket/ui/resetpwd/ResetPwdStep3.java @@ -8,6 +8,7 @@ import android.text.TextWatcher; import android.view.View; import android.widget.Button; import android.widget.EditText; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -46,7 +47,7 @@ public class ResetPwdStep3 extends BaseFragment { //重置密码按钮 @ViewInject(R.id.reset_pwd) - private Button resetpwdButton; + private TextView resetpwdButton; private ResetPwdViewModel resetPwdViewModel; diff --git a/app/src/main/res/drawable/bg_round_main.xml b/app/src/main/res/drawable/bg_round_main.xml new file mode 100644 index 0000000..bba8856 --- /dev/null +++ b/app/src/main/res/drawable/bg_round_main.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index e595ea5..17c12be 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -11,46 +11,62 @@ android:id="@+id/titlebar" layout="@layout/titlebar_layout" android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" /> + app:layout_constraintTop_toTopOf="parent"> + + - + app:layout_constraintTop_toBottomOf="@+id/imageView" + app:met_floatingLabel="highlight" /> - + app:layout_constraintTop_toBottomOf="@id/username" + app:met_floatingLabel="highlight" /> - + app:layout_constraintTop_toBottomOf="@+id/loading"> + + -