<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/playback"
        android:orientation="vertical"
        tools:context="com.fbx.PlaybackActivity">

        <RelativeLayout
            android:id="@+id/playback_content"
            android:layout_width="match_parent"
            android:layout_height="230dp">

            <FrameLayout
                android:id="@+id/gesture_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

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

            <ProgressBar
                android:id="@+id/loading_bar"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_centerInParent="true"
                android:visibility="invisible" />

        </RelativeLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="@android:color/black"
            android:gravity="center"
            android:orientation="horizontal"
            android:padding="10dp">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="horizontal">

                <Button
                    android:id="@+id/btn_start_time"
                    android:layout_width="wrap_content"
                    android:layout_height="20dp"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:text="请选择开始时间"
                    android:textColor="@android:color/white" />

                <Button
                    android:layout_width="30dp"
                    android:layout_height="wrap_content"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:text="-"
                    android:textColor="@android:color/white" />

                <Button
                    android:id="@+id/btn_end_time"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:text="请选择结束时间"
                    android:textColor="@android:color/white" />

            </LinearLayout>

            <ImageView
                android:id="@+id/btn_fullscreen"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:focusable="true"
                app:srcCompat="@drawable/ic_fullscreen" />

        </LinearLayout>

        <TextView
            android:id="@+id/camera_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingTop="20dp"
            android:paddingBottom="15dp"
            android:textColor="@android:color/white"
            android:textSize="20sp" />

        <TextView
            android:id="@+id/date_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:paddingBottom="5dp"
            android:textColor="@android:color/white"
            android:textSize="14sp" />

        <com.fbx.ScalableTimeBar
            android:id="@+id/time_bar"
            android:layout_width="match_parent"
            android:layout_height="300dp"
            android:layout_gravity="bottom"
            android:background="#cd000000" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/btn_camera"
                android:layout_width="0dp"
                android:layout_height="30dp"
                android:layout_weight="1"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:focusable="true"
                android:src="@drawable/btn_video_normal" />

            <ImageView
                android:id="@+id/btn_play"
                android:layout_width="0dp"
                android:layout_height="60dp"
                android:layout_weight="1"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:focusable="true"
                app:srcCompat="@drawable/btn_play_n" />

            <ImageView
                android:id="@+id/btn_snapshot"
                android:layout_width="0dp"
                android:layout_height="30dp"
                android:layout_weight="1"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:clickable="true"
                android:focusable="true"
                android:scaleType="fitCenter"
                android:src="@drawable/btn_photo_normal" />

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:gravity="center"
            android:orientation="horizontal">

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginStart="16dp"
                android:src="@drawable/btn_least" />

            <SeekBar
                android:id="@+id/sound_bar"
                android:layout_width="0dp"
                android:layout_height="40dp"
                android:layout_weight="1"
                android:progressTint="#2196F3"
                android:thumbTint="#2196F3" />

            <ImageView
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginEnd="16dp"
                android:src="@drawable/btn_loudest" />
        </LinearLayout>


    </LinearLayout>

    <RelativeLayout
        android:id="@+id/calendar_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerInParent="true"
        android:background="#4D000000"
        android:visibility="invisible">

        <DatePicker
            android:id="@+id/calendar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:background="@android:color/white"
            app:elevation="10dp" />

    </RelativeLayout>

</RelativeLayout>