Files
SecurityDefenseDevice/app/src/main/res/layout/face_login_activity.xml

300 lines
12 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<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: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="56dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginStart="16dp"
android:layout_marginRight="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="@string/face_recognition"
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:layout_marginStart="16dp"
android:id="@+id/tvRegisterSubtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/face_verification"
android:textColor="@color/black"
android:textSize="20dp"
android:textStyle="bold"
android:layout_marginTop="25dp"
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:layout_marginTop="10dp"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<ImageView
android:id="@+id/safeIcon"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@mipmap/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="@string/face_security_notice"
android:textColor="@color/green"
android:textSize="12sp"
android:textStyle="bold"
android:layout_marginStart="5dp"
app:layout_constraintStart_toEndOf="@id/safeIcon"
app:layout_constraintTop_toTopOf="@id/safeIcon"
app:layout_constraintBottom_toBottomOf="@id/safeIcon" />
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- 人脸图标占位符(模拟人脸识别形象) -->
<ImageView
android:layout_marginTop="50dp"
android:id="@+id/cardFaceIcon"
android:layout_width="150dp"
android:layout_height="150dp"
android:src="@mipmap/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="@string/follow_instructions"
android:textColor="@color/icon_face"
android:textSize="12dp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cardFaceIcon" />
<LinearLayout
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:layout_marginTop="48dp"
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">
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<LinearLayout
android:layout_gravity="center"
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="@mipmap/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="@mipmap/common_icons_miniprogram2"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/standard_capture"
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:layout_gravity="center"
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="@mipmap/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="@mipmap/common_icons_miniprogram1"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/standard_capture"
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:layout_gravity="center"
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="@mipmap/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="@mipmap/common_icons_miniprogram1"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/incomplete_capture"
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:layout_gravity="center"
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="@mipmap/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="@mipmap/common_icons_miniprogram1"/>
<TextView
android:layout_marginLeft="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/insufficient_light"
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_marginStart="25dp"
android:layout_marginEnd="25dp"
android:text="@string/start_verification"
android:textColor="@color/white"
android:textSize="14dp"
android:textStyle="bold"
android:elevation="0dp"
android:stateListAnimator="@null"
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>