<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1.3"
        android:background="@drawable/bg_face_matching_left">

        <io.fotoapparat.facedetector.view.CameraOverlayLayout
            android:id="@+id/previewView"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <!--
             app:layout_constraintDimensionRatio="4:3"
             android:layout_marginTop="30dp"
             android:layout_marginBottom="30dp"
             -->

            <io.fotoapparat.view.CameraView
                android:id="@+id/camera_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

            <io.fotoapparat.facedetector.view.RectanglesView
                android:id="@+id/rectanglesView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:rectanglesColor="#FF4081"
                app:rectanglesStrokeWidth="2dp" />

        </io.fotoapparat.facedetector.view.CameraOverlayLayout>

        <View
            android:id="@+id/recording"
            android:layout_width="8dp"
            android:layout_height="8dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="8dp"
            android:background="@drawable/point_red"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="@id/previewView"
            app:layout_constraintTop_toTopOf="@id/previewView" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/middle_line"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:layout_constraintGuide_percent="0.5" />

        <ImageView
            android:id="@+id/camera"
            android:layout_width="110dp"
            android:layout_height="101dp"
            android:contentDescription="@null"
            android:padding="30dp"
            android:src="@mipmap/icon_sign_in_camera"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.4" />

        <TextView
            android:id="@+id/countDown"
            android:layout_width="110dp"
            android:layout_height="101dp"
            android:gravity="center"
            android:textColor="@android:color/white"
            android:textSize="50sp"
            android:textStyle="bold"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.4"
            tools:text="3" />

        <TextView
            android:id="@+id/cameraTips"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="17dp"
            android:text="请对准摄像头"
            android:textColor="@android:color/white"
            android:textSize="17sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/camera" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:background="@drawable/bg_face_matching_right"
        android:paddingStart="30dp"
        android:paddingTop="12dp"
        android:paddingEnd="30dp"
        android:paddingBottom="12dp">

        <TextView
            android:id="@+id/checkType"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="穿戴安全准入检测"
            android:textColor="#ff333333"
            android:textSize="20sp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/samplePicture"
            android:layout_width="354dp"
            android:layout_height="203dp"
            android:layout_marginTop="12dp"
            android:contentDescription="@null"
            android:src="@mipmap/img_qd_syf"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/checkType" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginBottom="12dp"
            android:background="@drawable/bg_sing_in_violation"
            android:paddingStart="14dp"
            android:paddingTop="6dp"
            android:paddingEnd="14dp"
            android:paddingBottom="6dp"
            app:layout_constraintBottom_toTopOf="@id/startCheck"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/samplePicture">

            <TextView
                android:id="@+id/tips"
                android:layout_width="wrap_content"
                android:layout_height="20dp"
                android:drawableStart="@mipmap/icon_qd_tips"
                android:drawablePadding="5dp"
                android:gravity="center_vertical"
                android:text="小贴士："
                android:textColor="#ff333333"
                android:textSize="16sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tipInfo"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:lineSpacingMultiplier="1.2"
                android:text="@string/tip_info_syf_v2"
                android:textColor="#ff666666"
                android:textSize="14sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tips" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <TextView
            android:id="@+id/startCheck"
            android:layout_width="200dp"
            android:layout_height="45dp"
            android:background="@drawable/bg_btn_sign_safety_check"
            android:gravity="center"
            android:text="开始检测"
            android:textColor="@android:color/white"
            android:textSize="20sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.5"
            app:layout_constraintStart_toStartOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>