<RelativeLayout 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:paddingBottom="@dimen/oliveapp_activity_vertical_margin"
    android:paddingLeft="@dimen/oliveapp_activity_horizontal_margin"
    android:paddingRight="@dimen/oliveapp_activity_horizontal_margin"
    android:paddingTop="@dimen/oliveapp_activity_vertical_margin"
    tools:context=".liveness.view_controller.LivenessDetectionMainActivity">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.oliveapp.liveness.sample.uicomponents.FixedAspectLayout
            android:id="@+id/oliveapp_cameraPreviewLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:oliveapp_fixMode="fixWidth">

            <view
                android:id="@+id/oliveapp_cameraPreviewView"
                class="com.oliveapp.camerasdk.ui.CameraRootView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="0dp"
                android:layout_marginLeft="0dp"
                android:layout_marginRight="0dp"
                android:layout_marginTop="0dp" />

        </com.oliveapp.liveness.sample.uicomponents.FixedAspectLayout>

        <android.support.percent.PercentRelativeLayout
            android:id="@+id/oliveapp_detected_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <!--滤镜-->
            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@mipmap/oliveapp_background_filter_portrait_phone" />

            <!--人脸框-->
            <ImageView
                android:id="@+id/oliveapp_start_frame"
                android:layout_centerHorizontal="true"
                android:background="@mipmap/oliveapp_detect_frame"
                android:scaleType="centerCrop"
                app:layout_heightPercent="41.3%"
                app:layout_marginLeftPercent="13.2%"
                app:layout_marginTopPercent="27.4%"
                app:layout_widthPercent="73.5%" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_marginTopPercent="3%"
                app:layout_marginLeftPercent="3%"
                android:textSize="20sp"
                android:textColor="#ffffff"
                android:id="@+id/oliveapp_frame_rate_text"/>

            <!--关闭按钮-->
            <ImageButton
                android:id="@+id/oliveapp_close_image_button"
                android:layout_alignParentRight="true"
                android:layout_alignParentTop="true"
                android:background="@mipmap/oliveapp_close_icon"
                app:layout_heightPercent="4%"
                app:layout_marginRightPercent="6.6%"
                app:layout_marginTopPercent="6.8%"
                app:layout_aspectRatio="100%"/>

            <!--提示文字-->
            <android.support.percent.PercentRelativeLayout
                android:layout_centerHorizontal="true"
                app:layout_heightPercent="5.2%"
                app:layout_marginTopPercent="19.4%"
                app:layout_widthPercent="100%">

                <TextView
                    android:id="@+id/oliveapp_detected_hint_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:textColor="#FFFF00"
                    android:textSize="24sp"
                    android:text="@string/oliveapp_step_hint_focus"
                    app:layout_marginLeftPercent="2%"
                    app:layout_marginRightPercent="2%"/>

                <ImageView
                    android:id="@+id/oliveapp_detected_hint_left_border"
                    android:layout_alignParentBottom="true"
                    android:layout_toLeftOf="@id/oliveapp_detected_hint_text"
                    android:src="@mipmap/oliveapp_detect_hint_left_corner"
                    app:layout_heightPercent="18%"
                    app:layout_widthPercent="4%"/>

                <ImageView
                    android:id="@+id/oliveapp_detected_hint_right_border"
                    android:layout_alignParentTop="true"
                    android:layout_toRightOf="@id/oliveapp_detected_hint_text"
                    android:src="@mipmap/oliveapp_detect_hint_right_corner"
                    app:layout_heightPercent="18%"
                    app:layout_widthPercent="4%" />
            </android.support.percent.PercentRelativeLayout>
            <!--倒计时-->
            <TextView
                android:id="@+id/oliveapp_count_time_textview"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#FFFFFF"
                android:textSize="50sp"
                android:layout_alignParentBottom="true"
                android:layout_alignParentRight="true"
                android:layout_marginRight="20dp"
                />
        </android.support.percent.PercentRelativeLayout>

    </FrameLayout>

</RelativeLayout>
