Update Android app login, home, and face verification flows.

Sync current local UI and activity changes to remote repository.

Made-with: Cursor
This commit is contained in:
2026-04-27 15:39:47 +08:00
parent 2e6aba459c
commit b47704b281
24 changed files with 876 additions and 204 deletions

View File

@@ -2,9 +2,293 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/login_background"
android:id="@+id/main"
android:padding="16dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".login.FaceLoginActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topContainer"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<ImageView
android:id="@+id/backIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
<!-- 标题:注册 -->
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="人脸识别"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/backIcon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/backIcon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 副标题:注册用户 -->
<TextView
android:id="@+id/tvRegisterSubtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="人脸验证"
android:textColor="@color/black"
android:textSize="20dp"
android:textStyle="bold"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/topContainer" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topSubContainer"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvRegisterSubtitle"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<ImageView
android:id="@+id/safeIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/safe"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent" />
<!-- 标题:注册 -->
<TextView
android:id="@+id/tvSubTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="仅用于创建防御机制和防窃取,保障您的安全"
android:textColor="@color/green"
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@id/safeIcon"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/safeIcon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 人脸图标占位符(模拟人脸识别形象) -->
<ImageView
android:paddingTop="50dp"
android:id="@+id/cardFaceIcon"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@drawable/face_verification"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/topSubContainer" />
<!-- 提示信息 -->
<TextView
android:id="@+id/tvInstruction"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="11dp"
android:text="请根据指示完成人脸验证"
android:textColor="@color/icon_face"
android:textSize="12dp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cardFaceIcon" />
<LinearLayout
android:orientation="horizontal"
android:id="@+id/cbLowLight"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvInstruction"
android:paddingStart="16dp"
android:paddingTop="48dp"
android:paddingEnd="16dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<LinearLayout
android:background="@drawable/face_login_gray_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="59dp"
android:layout_height="59dp"
android:src="@drawable/mask_group"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/common_icons_miniprogram2"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="标准拍摄"
android:textColor="@color/icon_face"
android:textSize="12dp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<LinearLayout
android:background="@drawable/face_login_gray_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="59dp"
android:layout_height="59dp"
android:src="@drawable/standard_capture"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/common_icons_miniprogram1"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="标准拍摄"
android:textColor="@color/icon_face"
android:textSize="12dp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<LinearLayout
android:background="@drawable/face_login_gray_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="59dp"
android:layout_height="59dp"
android:src="@drawable/cropped_shot"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/common_icons_miniprogram1"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="拍摄不全"
android:textColor="@color/icon_face"
android:textSize="12dp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<LinearLayout
android:background="@drawable/face_login_gray_bg"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="59dp"
android:layout_height="59dp"
android:src="@drawable/low_light"/>
</LinearLayout>
<LinearLayout
android:layout_marginTop="10dp"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/common_icons_miniprogram1"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="光线不足"
android:textColor="@color/icon_face"
android:textSize="12dp"
android:textStyle="bold"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 开始验证按钮 -->
<android.widget.Button
android:id="@+id/btnStartVerification"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginTop="40dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="25dp"
android:layout_marginEnd="25dp"
android:text="开始验证"
android:textColor="@color/white"
android:textSize="14dp"
android:textStyle="bold"
android:background="@drawable/rounded_blue_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbLowLight" />
</androidx.constraintlayout.widget.ConstraintLayout>