244 lines
11 KiB
XML
244 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="#F6F7FB">
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:fillViewport="true">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingStart="24dp"
|
|
android:paddingEnd="24dp"
|
|
android:paddingTop="48dp"
|
|
android:paddingBottom="48dp">
|
|
|
|
<!-- 返回按钮 -->
|
|
<ImageView
|
|
android:id="@+id/backButton"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:contentDescription="返回"
|
|
android:padding="8dp"
|
|
android:src="@drawable/ic_arrow_back_24"
|
|
android:scaleType="fitCenter"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="8dp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<!-- 标题 -->
|
|
<TextView
|
|
android:id="@+id/appTitle"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:text="创建账号"
|
|
android:textColor="#111111"
|
|
android:textSize="32sp"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/backButton" />
|
|
|
|
<!-- 演示模式提示 -->
|
|
<TextView
|
|
android:id="@+id/demoModeHint"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:text="提示:后端未接入时,将使用演示模式注册"
|
|
android:textColor="#FF9800"
|
|
android:textSize="12sp"
|
|
android:visibility="visible"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/appTitle" />
|
|
|
|
<TextView
|
|
android:id="@+id/welcomeText"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:text="填写信息完成注册"
|
|
android:textColor="#666666"
|
|
android:textSize="16sp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/demoModeHint" />
|
|
|
|
<!-- 手机号输入框 -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/phoneLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="48dp"
|
|
android:hint="手机号"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/welcomeText"
|
|
app:boxBackgroundMode="outline"
|
|
app:boxCornerRadiusBottomEnd="12dp"
|
|
app:boxCornerRadiusBottomStart="12dp"
|
|
app:boxCornerRadiusTopEnd="12dp"
|
|
app:boxCornerRadiusTopStart="12dp"
|
|
app:boxStrokeColor="#E0E0E0"
|
|
app:hintTextColor="#999999">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/phoneInput"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="phone"
|
|
android:maxLines="1"
|
|
android:minHeight="56dp"
|
|
android:textColor="#111111"
|
|
android:textSize="16sp" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- 验证码输入框 - 已隐藏 -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/verificationCodeLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/phoneLayout">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/verificationCodeInput"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="number" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- 发送验证码按钮 - 已隐藏 -->
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/sendCodeButton"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/phoneLayout" />
|
|
|
|
<!-- 密码输入框 -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/passwordLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:hint="密码"
|
|
app:endIconMode="password_toggle"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/phoneLayout"
|
|
app:boxBackgroundMode="outline"
|
|
app:boxCornerRadiusBottomEnd="12dp"
|
|
app:boxCornerRadiusBottomStart="12dp"
|
|
app:boxCornerRadiusTopEnd="12dp"
|
|
app:boxCornerRadiusTopStart="12dp"
|
|
app:boxStrokeColor="#E0E0E0"
|
|
app:hintTextColor="#999999">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/passwordInput"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textPassword"
|
|
android:maxLines="1"
|
|
android:minHeight="56dp"
|
|
android:textColor="#111111"
|
|
android:textSize="16sp" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- 昵称输入框 -->
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:id="@+id/nicknameLayout"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:hint="昵称"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/passwordLayout"
|
|
app:boxBackgroundMode="outline"
|
|
app:boxCornerRadiusBottomEnd="12dp"
|
|
app:boxCornerRadiusBottomStart="12dp"
|
|
app:boxCornerRadiusTopEnd="12dp"
|
|
app:boxCornerRadiusTopStart="12dp"
|
|
app:boxStrokeColor="#E0E0E0"
|
|
app:hintTextColor="#999999">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/nicknameInput"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text"
|
|
android:maxLines="1"
|
|
android:minHeight="56dp"
|
|
android:textColor="#111111"
|
|
android:textSize="16sp" />
|
|
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- 注册按钮 -->
|
|
<com.google.android.material.button.MaterialButton
|
|
android:id="@+id/registerButton"
|
|
android:layout_width="0dp"
|
|
android:layout_height="56dp"
|
|
android:layout_marginTop="32dp"
|
|
android:backgroundTint="#6200EE"
|
|
android:text="注册"
|
|
android:textColor="@android:color/white"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
app:cornerRadius="12dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/nicknameLayout" />
|
|
|
|
<!-- 登录链接 -->
|
|
<TextView
|
|
android:id="@+id/loginLinkText"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="24dp"
|
|
android:clickable="true"
|
|
android:focusable="true"
|
|
android:padding="8dp"
|
|
android:text="已有账号?立即登录"
|
|
android:textColor="#6200EE"
|
|
android:textSize="14sp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/registerButton" />
|
|
|
|
<!-- 加载提示 -->
|
|
<ProgressBar
|
|
android:id="@+id/loadingProgress"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</ScrollView>
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|