<?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.4"
        android:background="@drawable/bg_face_matching_left">

        <io.fotoapparat.facedetector.view.CameraOverlayLayout
            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>

        <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/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="40dp"
        android:paddingTop="30dp"
        android:paddingEnd="40dp"
        android:paddingBottom="30dp">

        <ImageView
            android:id="@+id/personProfile"
            android:layout_width="84dp"
            android:layout_height="113dp"
            android:contentDescription="@null"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:src="@mipmap/icon_sign_in_avatar" />

        <TextView
            android:id="@+id/personName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="22dp"
            android:layout_marginTop="7dp"
            android:textColor="#FF333333"
            android:textSize="24sp"
            app:layout_constraintStart_toEndOf="@id/personProfile"
            app:layout_constraintTop_toTopOf="@id/personProfile"
            tools:text="曹秀康" />

        <TextView
            android:id="@+id/schoolNumber"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:textColor="#FF666666"
            android:textSize="14sp"
            app:layout_constraintStart_toStartOf="@id/personName"
            app:layout_constraintTop_toBottomOf="@id/personName"
            tools:text="学号：130000000" />

        <TextView
            android:id="@+id/expirationDate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:textSize="14sp"
            app:layout_constraintStart_toStartOf="@id/personName"
            app:layout_constraintTop_toBottomOf="@id/schoolNumber"
            tools:text="准入资格到期时间：2021年12月22日"
            tools:textColor="#FF666666" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/vertical_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="personProfile,expirationDate" />

        <TextView
            android:id="@+id/singInViolation"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="23dp"
            android:text="违规记录"
            android:textColor="#FF333333"
            android:textSize="14sp"
            app:layout_constraintStart_toStartOf="@id/personProfile"
            app:layout_constraintTop_toBottomOf="@id/vertical_barrier" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/violationInfo"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="14dp"
            android:background="@drawable/bg_sing_in_violation"
            android:paddingTop="12dp"
            android:paddingBottom="12dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="@id/personProfile"
            app:layout_constraintTop_toBottomOf="@id/singInViolation">

            <TextView
                android:id="@+id/violationContent"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="12dp"
                android:textColor="#FF666666"
                android:textSize="11sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="SmallSp"
                tools:text="违规行为：未整理实验室台" />

            <TextView
                android:id="@+id/subjectName"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="12dp"
                android:textColor="#FF666666"
                android:textSize="11sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/violationContent"
                tools:ignore="SmallSp"
                tools:text="违规地点：甲烷检测实验室" />

            <TextView
                android:id="@+id/createTime"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginTop="16dp"
                android:layout_marginEnd="12dp"
                android:textColor="#FF666666"
                android:textSize="11sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/subjectName"
                tools:ignore="SmallSp"
                tools:text="违规时间：2021年12月12日 12:20" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <LinearLayout
            android:id="@+id/infoLayout"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginTop="20dp"
            android:layout_marginBottom="20dp"
            android:gravity="center"
            android:orientation="horizontal"
            android:paddingStart="20dp"
            android:paddingEnd="20dp"
            android:visibility="visible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="@id/personProfile"
            app:layout_constraintTop_toBottomOf="@id/violationInfo">

            <ImageView
                android:layout_width="45dp"
                android:layout_height="45dp"
                android:contentDescription="@null"
                android:src="@mipmap/icon_sign_in_abnormal" />

            <TextView
                android:id="@+id/signInTips"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:textColor="#FFFF4E00"
                android:textSize="15sp"
                tools:text="当前账号被禁用，不能进行签到，请联系导师处理。" />

        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

</LinearLayout>