<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/transparent">

    <RelativeLayout
        android:id="@+id/title_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/black">

        <LinearLayout
            android:id="@+id/title_bar_with_back_btn"
            android:layout_width="match_parent"
            android:layout_height="@dimen/action_bar_height"
            android:background="@color/black"
            android:orientation="horizontal">

            <LinearLayout
                android:id="@+id/title_bar_back_layout"
                android:layout_width="70dp"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingLeft="12dp">

                <ImageView
                    android:layout_width="32dp"
                    android:layout_height="32dp"
                    android:src="@drawable/back_selector" />

            </LinearLayout>

            <TextView
                android:id="@+id/title_bar_middle_txt"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:singleLine="true"
                android:textColor="@color/white"
                android:textSize="18sp" />

            <LinearLayout
                android:id="@+id/title_bar_option_layout"
                android:layout_width="70dp"
                android:layout_height="match_parent"
                android:gravity="center_vertical|right"
                android:orientation="horizontal"
                android:paddingRight="12dp"
                android:visibility="invisible">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/more" />

            </LinearLayout>

        </LinearLayout>

    </RelativeLayout>

    <SurfaceView
        android:id="@+id/capture_preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/title_layout" />

    <RelativeLayout
        android:id="@+id/capture_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/title_layout">

        <TextView
            android:id="@+id/capture_mask_top"
            android:layout_width="match_parent"
            android:layout_height="90dp"
            android:background="@drawable/shadow"
            android:gravity="center"
            android:text="@string/qr_scan_hint"
            android:textColor="@color/white"
            android:textSize="14sp" />


        <RelativeLayout
            android:id="@+id/capture_crop_view"
            android:layout_width="240dp"
            android:layout_height="240dp"
            android:layout_below="@id/capture_mask_top"
            android:layout_centerHorizontal="true"
            android:background="@drawable/qr_code_bg">

            <ImageView
                android:id="@+id/capture_scan_line"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_marginBottom="5dp"
                android:layout_marginTop="5dp"
                android:src="@drawable/scan_line" />
        </RelativeLayout>

        <ImageView
            android:id="@+id/capture_mask_bottom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_below="@id/capture_crop_view"
            android:background="@drawable/shadow" />

        <ImageView
            android:id="@+id/capture_mask_left"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_above="@id/capture_mask_bottom"
            android:layout_alignParentLeft="true"
            android:layout_below="@id/capture_mask_top"
            android:layout_toLeftOf="@id/capture_crop_view"
            android:background="@drawable/shadow" />

        <ImageView
            android:id="@+id/capture_mask_right"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_above="@id/capture_mask_bottom"
            android:layout_alignParentRight="true"
            android:layout_below="@id/capture_mask_top"
            android:layout_toRightOf="@id/capture_crop_view"
            android:background="@drawable/shadow" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="120dp"
            android:layout_alignParentBottom="true"
            android:alpha="0.6"
            android:background="@color/black"
            android:orientation="horizontal">

            <LinearLayout
                android:id="@+id/layout_qr_album"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:gravity="center_horizontal"
                android:orientation="vertical">

                <ImageView
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_marginTop="30dp"
                    android:src="@drawable/qr_album" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingTop="5dp"
                    android:text="@string/qr_scan_album"
                    android:textColor="@color/grey"
                    android:textSize="16sp" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/layout_qr_flash"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:alpha="1"
                android:gravity="center_horizontal"
                android:orientation="vertical">

                <ImageView
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_marginTop="30dp"
                    android:src="@drawable/qr_flash" />

                <TextView
                    android:id="@+id/tv_flash_off_on"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingTop="5dp"
                    android:text="@string/qr_scan_flash_on"
                    android:textColor="@color/grey"
                    android:textSize="16sp" />
            </LinearLayout>

        </LinearLayout>
    </RelativeLayout>


</RelativeLayout>