@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/LLRiseTabBarDemo.iml" filepath="$PROJECT_DIR$/.idea/LLRiseTabBarDemo.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
@ -0,0 +1,151 @@
|
|||||||
|
package com.startsmake.llrisetabbardemo.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.CountDownTimer;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
import com.startsmake.llrisetabbardemo.R;
|
||||||
|
|
||||||
|
public class ForgotPasswordActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private TextInputEditText etPhone, etVerificationCode, etNewPassword;
|
||||||
|
private Button btnSendCode, btnResetPassword;
|
||||||
|
private ImageButton btnBack;
|
||||||
|
private TextView tvLogin;
|
||||||
|
|
||||||
|
private CountDownTimer countDownTimer;
|
||||||
|
private boolean isCounting = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_forgot_password);
|
||||||
|
|
||||||
|
initViews();
|
||||||
|
setupClickListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initViews() {
|
||||||
|
etPhone = findViewById(R.id.et_phone);
|
||||||
|
etVerificationCode = findViewById(R.id.et_verification_code);
|
||||||
|
etNewPassword = findViewById(R.id.et_new_password);
|
||||||
|
btnSendCode = findViewById(R.id.btn_send_code);
|
||||||
|
btnResetPassword = findViewById(R.id.btn_reset_password);
|
||||||
|
btnBack = findViewById(R.id.btn_back);
|
||||||
|
tvLogin = findViewById(R.id.tv_login);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupClickListeners() {
|
||||||
|
// 返回按钮
|
||||||
|
btnBack.setOnClickListener(v -> finish());
|
||||||
|
|
||||||
|
// 发送验证码
|
||||||
|
btnSendCode.setOnClickListener(v -> sendVerificationCode());
|
||||||
|
|
||||||
|
// 重置密码按钮
|
||||||
|
btnResetPassword.setOnClickListener(v -> attemptResetPassword());
|
||||||
|
|
||||||
|
// 返回登录
|
||||||
|
tvLogin.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(ForgotPasswordActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendVerificationCode() {
|
||||||
|
String phone = etPhone.getText().toString().trim();
|
||||||
|
|
||||||
|
if (phone.isEmpty()) {
|
||||||
|
etPhone.setError("请输入手机号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phone.length() != 11) {
|
||||||
|
etPhone.setError("手机号格式不正确");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isCounting) {
|
||||||
|
startCountDown();
|
||||||
|
Toast.makeText(this, "验证码已发送", Toast.LENGTH_SHORT).show();
|
||||||
|
// 这里应该调用后端API发送验证码
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCountDown() {
|
||||||
|
isCounting = true;
|
||||||
|
btnSendCode.setEnabled(false);
|
||||||
|
|
||||||
|
countDownTimer = new CountDownTimer(60000, 1000) {
|
||||||
|
@Override
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
|
btnSendCode.setText(millisUntilFinished / 1000 + "秒后重发");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinish() {
|
||||||
|
isCounting = false;
|
||||||
|
btnSendCode.setEnabled(true);
|
||||||
|
btnSendCode.setText("发送验证码");
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void attemptResetPassword() {
|
||||||
|
String phone = etPhone.getText().toString().trim();
|
||||||
|
String code = etVerificationCode.getText().toString().trim();
|
||||||
|
String newPassword = etNewPassword.getText().toString().trim();
|
||||||
|
|
||||||
|
if (phone.isEmpty()) {
|
||||||
|
etPhone.setError("请输入手机号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (code.isEmpty()) {
|
||||||
|
etVerificationCode.setError("请输入验证码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newPassword.isEmpty()) {
|
||||||
|
etNewPassword.setError("请输入新密码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phone.length() != 11) {
|
||||||
|
etPhone.setError("手机号格式不正确");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newPassword.length() < 6) {
|
||||||
|
etNewPassword.setError("密码至少6位");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 模拟重置密码成功
|
||||||
|
performResetPassword();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performResetPassword() {
|
||||||
|
Toast.makeText(this, "密码重置成功!", Toast.LENGTH_SHORT).show();
|
||||||
|
// 重置成功后跳转到登录页面
|
||||||
|
Intent intent = new Intent(ForgotPasswordActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (countDownTimer != null) {
|
||||||
|
countDownTimer.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
package com.startsmake.llrisetabbardemo.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
import com.startsmake.llrisetabbardemo.R;
|
||||||
|
|
||||||
|
public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private TextInputEditText etPhone, etPassword;
|
||||||
|
private Button btnLogin, btnSkipLogin;
|
||||||
|
private TextView tvForgotPassword, tvRegister;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
|
initViews();
|
||||||
|
setupClickListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initViews() {
|
||||||
|
etPhone = findViewById(R.id.et_phone);
|
||||||
|
etPassword = findViewById(R.id.et_password);
|
||||||
|
btnLogin = findViewById(R.id.btn_login);
|
||||||
|
btnSkipLogin = findViewById(R.id.btn_skip_login);
|
||||||
|
tvForgotPassword = findViewById(R.id.tv_forgot_password);
|
||||||
|
tvRegister = findViewById(R.id.tv_register);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupClickListeners() {
|
||||||
|
// 登录按钮
|
||||||
|
btnLogin.setOnClickListener(v -> attemptLogin());
|
||||||
|
|
||||||
|
// 跳过登录按钮
|
||||||
|
btnSkipLogin.setOnClickListener(v -> skipToMain());
|
||||||
|
|
||||||
|
// 忘记密码
|
||||||
|
tvForgotPassword.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, ForgotPasswordActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 注册
|
||||||
|
tvRegister.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void attemptLogin() {
|
||||||
|
String phone = etPhone.getText().toString().trim();
|
||||||
|
String password = etPassword.getText().toString().trim();
|
||||||
|
|
||||||
|
if (phone.isEmpty()) {
|
||||||
|
etPhone.setError("请输入手机号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.isEmpty()) {
|
||||||
|
etPassword.setError("请输入密码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phone.length() != 11) {
|
||||||
|
etPhone.setError("手机号格式不正确");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 模拟登录成功(因为没有后端)
|
||||||
|
performLogin();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performLogin() {
|
||||||
|
Toast.makeText(this, "登录成功!", Toast.LENGTH_SHORT).show();
|
||||||
|
navigateToMain();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void skipToMain() {
|
||||||
|
Toast.makeText(this, "跳过登录,进入主界面", Toast.LENGTH_SHORT).show();
|
||||||
|
navigateToMain();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void navigateToMain() {
|
||||||
|
Intent intent = new Intent(LoginActivity.this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,151 @@
|
|||||||
|
package com.startsmake.llrisetabbardemo.activity;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.CountDownTimer;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
import com.startsmake.llrisetabbardemo.R;
|
||||||
|
|
||||||
|
public class RegisterActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
private TextInputEditText etPhone, etVerificationCode, etPassword;
|
||||||
|
private Button btnSendCode, btnRegister;
|
||||||
|
private ImageButton btnBack;
|
||||||
|
private TextView tvLogin;
|
||||||
|
|
||||||
|
private CountDownTimer countDownTimer;
|
||||||
|
private boolean isCounting = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_register);
|
||||||
|
|
||||||
|
initViews();
|
||||||
|
setupClickListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initViews() {
|
||||||
|
etPhone = findViewById(R.id.et_phone);
|
||||||
|
etVerificationCode = findViewById(R.id.et_verification_code);
|
||||||
|
etPassword = findViewById(R.id.et_password);
|
||||||
|
btnSendCode = findViewById(R.id.btn_send_code);
|
||||||
|
btnRegister = findViewById(R.id.btn_register);
|
||||||
|
btnBack = findViewById(R.id.btn_back);
|
||||||
|
tvLogin = findViewById(R.id.tv_login);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupClickListeners() {
|
||||||
|
// 返回按钮
|
||||||
|
btnBack.setOnClickListener(v -> finish());
|
||||||
|
|
||||||
|
// 发送验证码
|
||||||
|
btnSendCode.setOnClickListener(v -> sendVerificationCode());
|
||||||
|
|
||||||
|
// 注册按钮
|
||||||
|
btnRegister.setOnClickListener(v -> attemptRegister());
|
||||||
|
|
||||||
|
// 立即登录
|
||||||
|
tvLogin.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void sendVerificationCode() {
|
||||||
|
String phone = etPhone.getText().toString().trim();
|
||||||
|
|
||||||
|
if (phone.isEmpty()) {
|
||||||
|
etPhone.setError("请输入手机号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phone.length() != 11) {
|
||||||
|
etPhone.setError("手机号格式不正确");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isCounting) {
|
||||||
|
startCountDown();
|
||||||
|
Toast.makeText(this, "验证码已发送", Toast.LENGTH_SHORT).show();
|
||||||
|
// 这里应该调用后端API发送验证码
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void startCountDown() {
|
||||||
|
isCounting = true;
|
||||||
|
btnSendCode.setEnabled(false);
|
||||||
|
|
||||||
|
countDownTimer = new CountDownTimer(60000, 1000) {
|
||||||
|
@Override
|
||||||
|
public void onTick(long millisUntilFinished) {
|
||||||
|
btnSendCode.setText(millisUntilFinished / 1000 + "秒后重发");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinish() {
|
||||||
|
isCounting = false;
|
||||||
|
btnSendCode.setEnabled(true);
|
||||||
|
btnSendCode.setText("发送验证码");
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void attemptRegister() {
|
||||||
|
String phone = etPhone.getText().toString().trim();
|
||||||
|
String code = etVerificationCode.getText().toString().trim();
|
||||||
|
String password = etPassword.getText().toString().trim();
|
||||||
|
|
||||||
|
if (phone.isEmpty()) {
|
||||||
|
etPhone.setError("请输入手机号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (code.isEmpty()) {
|
||||||
|
etVerificationCode.setError("请输入验证码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.isEmpty()) {
|
||||||
|
etPassword.setError("请输入密码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phone.length() != 11) {
|
||||||
|
etPhone.setError("手机号格式不正确");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.length() < 6) {
|
||||||
|
etPassword.setError("密码至少6位");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 模拟注册成功
|
||||||
|
performRegister();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void performRegister() {
|
||||||
|
Toast.makeText(this, "注册成功!", Toast.LENGTH_SHORT).show();
|
||||||
|
// 注册成功后跳转到登录页面
|
||||||
|
Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
if (countDownTimer != null) {
|
||||||
|
countDownTimer.cancel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#20FFD700" />
|
||||||
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#FFD700" />
|
||||||
|
<corners android:radius="24dp" />
|
||||||
|
</shape>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#20FFD700" />
|
||||||
|
<corners android:radius="24dp" />
|
||||||
|
<stroke android:width="1dp" android:color="#FFD700" />
|
||||||
|
</shape>
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#333333">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
|
||||||
|
</vector>
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<!-- 返回按钮 -->
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_back"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_arrow_back"
|
||||||
|
android:tint="#333333" />
|
||||||
|
|
||||||
|
<!-- 标题 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:text="忘记密码"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 手机号输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_phone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="手机号"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 验证码输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_verification_code"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="验证码"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_send_code"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/bg_button_code"
|
||||||
|
android:text="发送验证码"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 新密码输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_new_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="设置新密码"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 重置密码按钮 -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_reset_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="@drawable/bg_button_primary"
|
||||||
|
android:text="重置密码"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 底部链接 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="想起密码?"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_login"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="返回登录"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<!-- Logo -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="120dp"
|
||||||
|
android:layout_height="120dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="60dp"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:src="@mipmap/ic_launcher"
|
||||||
|
android:tint="#FFD700" />
|
||||||
|
|
||||||
|
<!-- 标题 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:text="BudgetFindly"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 手机号输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_phone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="手机号"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 密码输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="密码"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 登录按钮 -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_login"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="@drawable/bg_button_primary"
|
||||||
|
android:text="登录"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 跳过登录按钮 -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_skip_login"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:background="@drawable/bg_button_secondary"
|
||||||
|
android:text="跳过登录"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<!-- 底部链接 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_forgot_password"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="忘记密码?"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="12dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:background="#DDDDDD" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_register"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="立即注册"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
@ -0,0 +1,170 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#FFFFFF"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<!-- 返回按钮 -->
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_back"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:src="@drawable/ic_arrow_back"
|
||||||
|
android:tint="#333333" />
|
||||||
|
|
||||||
|
<!-- 标题 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:layout_marginBottom="40dp"
|
||||||
|
android:text="注册账号"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 手机号输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_phone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="手机号"
|
||||||
|
android:inputType="phone"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 验证码输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_verification_code"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:hint="验证码"
|
||||||
|
android:inputType="number"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_send_code"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:background="@drawable/bg_button_code"
|
||||||
|
android:text="发送验证码"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 密码输入框 -->
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
app:boxCornerRadiusBottomEnd="12dp"
|
||||||
|
app:boxCornerRadiusBottomStart="12dp"
|
||||||
|
app:boxCornerRadiusTopEnd="12dp"
|
||||||
|
app:boxCornerRadiusTopStart="12dp"
|
||||||
|
app:boxStrokeColor="#FFD700"
|
||||||
|
app:hintTextColor="#999999">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_password"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="设置密码"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<!-- 注册按钮 -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_register"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="@drawable/bg_button_primary"
|
||||||
|
android:text="注册"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- 底部链接 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="已有账号?"
|
||||||
|
android:textColor="#666666"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_login"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="立即登录"
|
||||||
|
android:textColor="#FFD700"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</ScrollView>
|
||||||
@ -1,11 +1,9 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<!--<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/xianyu_yellow</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/xianyu_yellow_dark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>-->
|
<item name="colorAccent">@color/xianyu_yellow</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#Sat Oct 11 19:07:18 CST 2025
|
#Sat Oct 11 19:07:18 CST 2025
|
||||||
|
# gradle-wrapper.properties
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0-milestone-1-bin.zip
|
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.6-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@ -1,23 +1,34 @@
|
|||||||
apply plugin: 'com.android.library'
|
// mainnavigatetabbar/build.gradle
|
||||||
|
plugins {
|
||||||
|
id 'com.android.library'
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.startsmake.mainnavigatetabbar"
|
namespace "com.startsmake.mainnavigatetabbar"
|
||||||
compileSdkVersion 23
|
compileSdk 33
|
||||||
buildToolsVersion "23.0.1"
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdk 21
|
||||||
targetSdkVersion 23
|
targetSdk 33
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
implementation 'com.android.support:appcompat-v7:23.1.1'
|
implementation 'androidx.fragment:fragment:1.6.1'
|
||||||
|
|
||||||
|
// 使用统一的 Kotlin 版本
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.20"
|
||||||
}
|
}
|
||||||
Loading…
Reference in new issue