<?xml version="1.0" encoding="utf-8"?>

<layout xmlns:android="http://schemas.android.com/apk/res/android">

    <RelativeLayout
        android:id="@+id/liveness_layout_rootRel"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <TextureView
            android:id="@+id/liveness_layout_textureview"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <com.megvii.idcardlib.view.AutoRatioImageview
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:src="@drawable/liveness_layout_camera_mask" />

        <com.megvii.idcardlib.FaceMask
            android:id="@+id/liveness_layout_facemask"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" />

        <com.megvii.idcardlib.view.AutoRatioImageview
            android:id="@+id/liveness_layout_head_mask"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:src="@drawable/liveness_layout_head_mask" />

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@id/liveness_layout_head_mask"
            android:background="#F6F5F4">

            <include
                android:id="@+id/activity_main_bottomTitle"
                layout="@layout/bottom_title_layout"
                android:layout_width="match_parent"
                android:layout_height="40dip"
                android:layout_alignParentBottom="true"
                android:visibility="gone" />

            <include
                android:id="@+id/liveness_layout_first_layout"
                layout="@layout/liveness_detection_step"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_above="@+id/activity_main_bottomTitle"
                android:layout_marginBottom="15dip"
                android:layout_marginTop="15dip"
                android:visibility="invisible" />

            <include
                android:id="@+id/liveness_layout_second_layout"
                layout="@layout/liveness_detection_step"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_above="@+id/activity_main_bottomTitle"
                android:layout_marginBottom="15dip"
                android:layout_marginTop="15dip"
                android:visibility="gone" />

            <LinearLayout
                android:id="@+id/liveness_layout_bottom_tips_head"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_above="@+id/activity_main_bottomTitle"
                android:layout_centerHorizontal="true"
                android:gravity="center"
                android:orientation="vertical"
                android:visibility="visible">

                <TextView
                    android:id="@+id/liveness_layout_promptText"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dip"
                    android:text="@string/meglive_prompt"
                    android:textColor="#00ACDF"
                    android:textSize="16dp" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dip"
                    android:src="@drawable/liveness_phoneimage" />
            </LinearLayout>

            <RelativeLayout
                android:id="@+id/detection_step_timeoutRel"
                android:layout_width="35dip"
                android:layout_height="35dip"
                android:layout_alignParentRight="true"
                android:layout_margin="5dip"
                android:visibility="invisible">

                <TextView
                    android:id="@+id/detection_step_timeout_garden"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:text="10"
                    android:textColor="#00BEE2"
                    android:textSize="20sp" />

                <com.megvii.idcardlib.view.CircleProgressBar
                    android:id="@+id/detection_step_timeout_progressBar"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_centerInParent="true" />
            </RelativeLayout>
        </RelativeLayout>

        <ImageView
            android:layout_width="70dp"
            android:layout_height="70dp"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:layout_marginRight="20dp"
            android:scaleType="centerInside"
            android:src="@drawable/liveness_faceppinside"
            android:visibility="gone" />

        <ProgressBar
            android:id="@+id/liveness_layout_progressbar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:visibility="invisible" />

    </RelativeLayout>
</layout>