<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout 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">

    <RelativeLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:animateLayoutChanges="true"
        android:fitsSystemWindows="true">

        <FrameLayout
            android:id="@+id/contentLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <com.onfido.android.sdk.capture.ui.camera.face.CameraSourcePreview
                android:id="@+id/cameraView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:importantForAccessibility="no"
                android:background="@color/onfido_dark_500" />

            <com.onfido.android.sdk.capture.ui.ZoomImageView
                android:id="@+id/confirmationImage"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:adjustViewBounds="true"
                android:contentDescription="@null"
                android:scaleType="centerCrop"
                android:visibility="invisible" />

        </FrameLayout>

        <com.onfido.android.sdk.capture.ui.camera.liveness.LivenessOverlayView
            android:id="@+id/livenessOverlayView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone" />

        <com.onfido.android.sdk.capture.ui.camera.OverlayTextView
            android:id="@+id/overlayTextContainer"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="@dimen/onfido_capture_instructions_outer_margin"
            android:visibility="invisible"
            tools:ignore="UnknownId" />

        <com.onfido.android.sdk.capture.ui.camera.ConfirmationStepButtons
            android:id="@+id/confirmationButtons"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_marginLeft="@dimen/onfido_confirmation_buttons_activity_horizontal_margin"
            android:layout_marginRight="@dimen/onfido_confirmation_buttons_activity_horizontal_margin"
            android:layout_marginBottom="@dimen/onfido_message_button_bottom_margin"
            android:visibility="invisible" />

        <com.onfido.android.sdk.capture.validation.CaptureValidationBubble
            android:id="@+id/liveValidationBubble"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:clickable="false" />

        <com.onfido.android.sdk.capture.validation.CaptureValidationBubble
            android:id="@+id/postCaptureValidationBubble"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:clickable="false" />

        <com.onfido.android.sdk.capture.edge_detector.EdgeDetectorFrame
            android:id="@+id/captureFrame"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="invisible">

            <com.onfido.android.sdk.capture.edge_detector.EdgeDetectorTextLabel
                android:id="@+id/edgeDetectionLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:visibility="invisible" />
        </com.onfido.android.sdk.capture.edge_detector.EdgeDetectorFrame>

        <ImageView
            android:id="@+id/passportOverlay"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="fitEnd"
            android:visibility="invisible"
            app:srcCompat="@drawable/onfido_passport_overlay" />

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:minHeight="?attr/actionBarSize" />
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/bottomSheet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/onfido_white"
        android:clipToPadding="false"
        app:behavior_hideable="true"
        app:elevation="4dp"
        app:layout_behavior="android.support.design.widget.BottomSheetBehavior">

        <include layout="@layout/onfido_auto_capture_info_layout" />

    </RelativeLayout>
</android.support.design.widget.CoordinatorLayout>
