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"> + + -