<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:opencv="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FF000000"
    >

    <!-- The primary full-screen view. This can be replaced with whatever view
         is needed to present your content, e.g. VideoView, SurfaceView,
         TextureView, etc. -->

    <SurfaceView
        android:id="@+id/surfaceView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:visibility="gone"
        android:layout_alignParentStart="false"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="left|center_vertical"
        >

        <ImageView
            android:layout_width="0px"
            android:layout_height="0px"
            android:layout_marginLeft="0px"
            android:layout_marginBottom="0px"
            android:id="@+id/scannedAnimation"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:background="#00000000"
            android:visibility="invisible" />

        <com.reactnativedocumentscannerandroid.views.HUDCanvasView
            android:id="@+id/hud"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:background="#00000000"
            android:paddingBottom="0dp"
            android:paddingLeft="0dp" />

    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/wait_spinner"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:visibility="invisible">

        <ProgressBar
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:indeterminate="true" />

    </RelativeLayout>

    <View
        android:id="@+id/blink_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible" />

</FrameLayout>
