<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/activity_page" >

    <SurfaceView
        android:id="@+id/svCameraScan"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center" />

    <!-- 必须在最底层，且不能指定宽高，否则扫描读取很难实现 -->

    <com.zxing.view.ViewfinderView
        android:id="@+id/vfvCameraScan"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <LinearLayout
        style="@style/ll_vertical_match_match"
        android:baselineAligned="false" >

        <RelativeLayout
            style="@style/topbar_bg"
            android:background="@color/white_alpha" >

            <TextView
                style="@style/topbar_left_btn"
                android:text="          " />

            <TextView
                style="@style/topbar_title"
                android:layout_centerHorizontal="true"
                android:text="扫一扫"
                android:textColor="@color/black" />
        </RelativeLayout>

        <LinearLayout
            style="@style/ll_vertical_match_match"
            android:layout_gravity="center_horizontal"
            android:layout_weight="1" >

            <TextView
                style="@style/text_middle_white"
                android:layout_margin="30dp"
                android:text="将取景框对准二维码\n即可自动扫描" />
        </LinearLayout>

        <LinearLayout
            style="@style/ll_horizontal_match_wrap"
            android:layout_gravity="bottom"
            android:background="@color/white_alpha"
            android:gravity="center" >

            <LinearLayout
                style="@style/ll_vertical_wrap_wrap"
                android:layout_margin="12dp"
                android:paddingBottom="4dp"
                android:paddingLeft="12dp"
                android:paddingRight="12dp"
                android:paddingTop="4dp" >

                <ImageView
                    android:onClick="onReturnClick"
                    style="@style/wrap_wrap"
                    android:background="@drawable/cilcle_gray_to_white"
                    android:padding="12dp"
                    android:src="@drawable/back_black_light" />

                <TextView
                    style="@style/text_small"
                    android:layout_marginTop="4dp"
                    android:text="返回" />
            </LinearLayout>

            <LinearLayout
                style="@style/ll_vertical_wrap_wrap"
                android:layout_margin="12dp"
                android:paddingBottom="4dp"
                android:paddingLeft="12dp"
                android:paddingRight="12dp"
                android:paddingTop="4dp" >

                <ImageView
                    android:id="@+id/ivCameraScanLight"
                    style="@style/wrap_wrap"
                    android:background="@drawable/cilcle_gray_to_white"
                    android:padding="12dp"
                    android:src="@drawable/flash_light" />

                <TextView
                    style="@style/text_small"
                    android:layout_marginTop="4dp"
                    android:text="开灯/关灯" />
            </LinearLayout>

            <LinearLayout
                style="@style/ll_vertical_wrap_wrap"
                android:layout_margin="12dp"
                android:paddingBottom="4dp"
                android:paddingLeft="12dp"
                android:paddingRight="12dp"
                android:paddingTop="4dp" >

                <ImageView
                    android:onClick="onForwardClick"
                    style="@style/wrap_wrap"
                    android:background="@drawable/cilcle_gray_to_white"
                    android:padding="12dp"
                    android:src="@drawable/qrcode" />

                <TextView
                    style="@style/text_small"
                    android:layout_marginTop="4dp"
                    android:text="我的名片" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

</FrameLayout>