<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/main_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#f1f2f3"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <RelativeLayout
        android:id="@+id/play_container"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:clickable="true"
        android:focusable="true"
        android:gravity="center">

        <!-- 播放窗口 -->
        <FrameLayout
            android:id="@+id/gesture_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:overScrollMode="never">

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

        </FrameLayout>

        <!-- 暂停时的截图 -->
        <ImageView
            android:id="@+id/recover_holder_image"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:contentDescription="暂停快照"
            android:scaleType="fitXY" />

        <!-- 暂停回复加载动画 -->
        <ProgressBar
            android:id="@+id/recover_loading_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true" />

        <!-- 加载背景 -->
        <RelativeLayout
            android:id="@+id/play_loading"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:contentDescription="加载背景"
                android:scaleType="centerCrop"
                app:srcCompat="@drawable/ic_play" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:orientation="vertical">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerInParent="true"
                        android:orientation="horizontal">

                        <ImageView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            app:srcCompat="@drawable/ic_logo" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="center"
                            android:text="督贝巡店"
                            android:textColor="@android:color/white"
                            android:textSize="14dp"
                            android:textStyle="bold" />
                    </LinearLayout>
                </RelativeLayout>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="4dp"
                    android:text="稍等，巡店视频即将连上..."
                    android:textColor="@android:color/darker_gray"
                    android:textSize="12dp" />

            </LinearLayout>
        </RelativeLayout>

        <!-- 播放控制工具 -->
        <LinearLayout
            android:id="@+id/play_control"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/btn_popwindow"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_margin="10dp"
                android:alpha="0.8"
                android:clickable="true"
                android:focusable="true"
                app:srcCompat="@drawable/ic_plus" />

            <ImageView
                android:id="@+id/btn_play"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_margin="10dp"
                android:alpha="0.8"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?attr/selectableItemBackground"
                app:srcCompat="@drawable/ic_pause" />

            <RelativeLayout
                android:id="@+id/btn_fullscreen"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?attr/selectableItemBackground">

                <ImageView
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:layout_alignParentRight="true"
                    android:layout_margin="10dp"
                    app:srcCompat="@drawable/ic_fullscreen" />

            </RelativeLayout>

        </LinearLayout>

        <!-- 顶部工具栏 -->
        <LinearLayout
            android:id="@+id/play_head"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentLeft="true"
            android:minHeight="?attr/actionBarSize"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/btn_back"
                android:layout_width="?attr/actionBarSize"
                android:layout_height="?attr/actionBarSize"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?android:attr/selectableItemBackground"
                android:scaleType="center"
                app:srcCompat="@drawable/ic_back" />

            <TextView
                android:id="@+id/store_title"
                android:layout_width="0dp"
                android:layout_height="?attr/actionBarSize"
                android:layout_weight="1"
                android:gravity="center"
                android:text="高新区特别店铺"
                android:textColor="@android:color/white"
                android:textSize="18dp" />

            <ImageView
                android:layout_width="?attr/actionBarSize"
                android:layout_height="?attr/actionBarSize"
                android:alpha="0.8"
                android:clickable="true"
                android:focusable="true"
                android:foreground="?android:attr/selectableItemBackground"
                android:scaleType="center"
                app:srcCompat="@drawable/ic_help" />

        </LinearLayout>

    </RelativeLayout>

    <!-- 控制菜单 -->
    <include layout="@layout/popup_tool_control" />

    <TextView
        android:id="@+id/subject_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="20dp"
        android:layout_marginBottom="10dp"
        android:text="所有监控点(6)"
        android:textColor="@android:color/black"
        android:textSize="18sp"
        android:textStyle="bold" />

    <!-- 摄像头列表 -->
    <android.support.v7.widget.RecyclerView
        android:id="@+id/camera_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>

