<?xml version="1.0" encoding="utf-8"?><!--
  ~  Copyright(c) 2017 lizhaotailang
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->


<FrameLayout 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:id="@+id/layout_scan_code"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

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

        <ImageView
            android:id="@+id/capture_mask_top"
            android:layout_width="match_parent"
            android:layout_height="140dp"
            android:layout_alignParentTop="true"
            android:background="@drawable/shadow" />

        <RelativeLayout
            android:id="@+id/capture_crop_view"
            android:layout_width="250dp"
            android:layout_height="250dp"
            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_marginTop="5dp"
                android:layout_marginBottom="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_below="@id/capture_crop_view"
            android:layout_alignParentBottom="true"
            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_below="@id/capture_mask_top"
            android:layout_alignParentStart="true"
            android:layout_alignParentLeft="true"
            android:layout_toStartOf="@id/capture_crop_view"
            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_below="@id/capture_mask_top"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_toEndOf="@id/capture_crop_view"
            android:layout_toRightOf="@id/capture_crop_view"
            android:background="@drawable/shadow" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="35dp"
            android:layout_below="@id/capture_crop_view"
            android:layout_marginLeft="40dp"
            android:layout_marginTop="5dp"
            android:layout_marginRight="40dp"
            android:layout_marginBottom="50dp"
            android:gravity="center"
            android:text="请将二维码置于扫描框内"
            android:textColor="@color/white"
            android:textSize="12sp" />

        <TextView
            android:id="@+id/tv_input_"
            android:layout_width="match_parent"
            android:layout_height="35dp"
            android:layout_alignParentBottom="true"
            android:layout_marginLeft="40dp"
            android:layout_marginRight="40dp"
            android:layout_marginBottom="50dp"
            android:gravity="center" android:visibility="gone"
            android:text="手动输入检票"
            android:textColor="@color/white"
            android:textSize="12sp" />
    </RelativeLayout>

</FrameLayout>
