<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

    <LinearLayout
        android:id="@+id/side_panel_zone"
        android:layout_width="150dp"
        android:layout_height="fill_parent"
        android:background="@drawable/side_bg"
        android:orientation="vertical"
        android:visibility="visible" >

        <!-- FUNCTIONS SELECTION BUTTONS -->

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="54dp"
            android:background="@color/menu"
            android:gravity="center"
            android:orientation="horizontal" >

            <ImageButton
                android:id="@+id/generic_section_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:src="@drawable/baseline_slideshow_black_24"  />

            <ImageButton
                android:id="@+id/cc_section_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:src="@drawable/baseline_list_black_24" />

            <ImageButton
                android:id="@+id/abr_section_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:enabled="true"
                android:src="@drawable/baseline_device_hub_black_24"  />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/genericinfo_section_lyt"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="3dp"
            android:orientation="vertical"
            android:visibility="visible">

            <TextView
                android:id="@+id/video_res_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/default_video_res" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:orientation="horizontal">

                <Button
                    android:id="@+id/video_experience_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:text="@string/hd_experience"
                    android:textAllCaps="false" />

                <TextView
                    android:id="@+id/video_experience_text"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_gravity="center"
                    android:layout_margin="2dp"
                    android:enabled="false"
                    android:gravity="center"
                    android:text="@string/spinner_next_off"
                    android:textColor="@color/highlight_file"
                    android:textStyle="bold"/>
            </LinearLayout>

            <Button
                android:id="@+id/ve_boost_btn"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="left"
                android:gravity="center"
                android:text="@string/ve_boost"
                android:textAllCaps="false" />

            <Button
                android:id="@+id/audio_booster_btn"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="@string/audioBooster"
                android:textAllCaps="false"
                android:textColor="@color/highlight_file"
                android:textStyle="bold"
                android:visibility="gone" />

            <TextView
                android:id="@+id/additional_info_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/empty_text"
                android:visibility="gone" />

            <Button
                android:id="@+id/fastzapping_pplus_btn"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/p_plus"
                android:textAllCaps="false" />

            <Button
                android:id="@+id/fastzapping_pminus_btn"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/p_minus"
                android:textAllCaps="false" />
        </LinearLayout>

        <!-- Subtitle / closed caption related functions -->

        <LinearLayout
            android:id="@+id/tracks_section_lyt"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="3dp"
            android:orientation="vertical"
            android:visibility="gone">

            <Button
                android:id="@+id/subtitle_track_btn"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:enabled="true"
                android:paddingTop="2dp"
                android:text="@string/subtitles"
                android:textAllCaps="false" />

            <Button
                android:id="@+id/audio_track_btn"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:enabled="true"
                android:text="@string/audio_track"
                android:textAllCaps="false" />

            <Button
                android:id="@+id/metadata_id3_btn"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:enabled="true"
                android:text="@string/metadata_id3_off"
                android:textAllCaps="false" />
        </LinearLayout>

        <!-- HLS related functions -->

        <ScrollView
            android:id="@+id/abr_section_lyt"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="3dp"
            android:visibility="gone">

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

                <TextView
                    android:id="@+id/http_streaming_alternate"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/alternate" />

                <TextView
                    android:id="@+id/http_streaming_current_br"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/current_br" />

                <TextView
                    android:id="@+id/http_streaming_current_buffer"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Buffer: - ms" />

                <LinearLayout
                    android:id="@+id/abr_custom_bitrates"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:paddingTop="2dp"
                    android:visibility="gone">

                    <Button
                        android:id="@+id/abr_custom_bitrate_down"
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="@string/custom_br_down"
                        android:textAllCaps="false" />

                    <Button
                        android:id="@+id/abr_custom_bitrate_up"
                        android:layout_width="0dip"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="@string/custom_br_up"
                        android:textAllCaps="false" />
                </LinearLayout>

                <Button
                    android:id="@+id/abr_min_limit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingTop="2dp"
                    android:text="@string/limit_min_br"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/abr_max_limit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/limit_max_br"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/set_alternate_btn"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:enabled="true"
                    android:text="@string/set_alternate"
                    android:textAllCaps="false" />

                <!-- NETWORK CONTROLS AREA -->

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:orientation="horizontal"
                    android:paddingTop="2dp">

                    <ImageButton
                        android:id="@+id/BtnWifiToggle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/wifi_off" />

                    <ImageView
                        android:id="@+id/cellular_state_img"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/cellular_on" />
                </LinearLayout>

                <TextView
                    android:id="@+id/wifi_network_info"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:ellipsize="end"
                    android:text="@string/none" />
            </LinearLayout>
        </ScrollView>
    </LinearLayout>

    <RelativeLayout
        android:id="@+id/player_screen_zone"
        android:layout_width="fill_parent"
        android:background="@color/black"
        android:layout_height="fill_parent" >

        <com.viaccessorca.voplayer.VOSurfaceView
            android:id="@+id/VideoSurface"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_gravity="center" />

        <ImageView
            android:id="@+id/player_scrubbing_thumbnail_overlay"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_gravity="center" />

        <Button
            android:id="@+id/player_skip_ad_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAllCaps="false"
            android:textColor="#FFFFFF"
            android:contentDescription="skip ad button"
            android:background="@drawable/lvwidget_skip_ad_btn"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:gravity="center"
            android:layout_marginRight="10dp"
            android:layout_marginTop="60dp"
            android:visibility="gone" />

        <LinearLayout
            android:id="@+id/stream_info_overlay"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@color/color_ddarkgray"
            android:orientation="vertical"
            android:layout_marginLeft="40dp"
            android:padding="5dp"
            android:visibility="gone" >

            <TextView
                android:id="@+id/overlay_current_br"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/current_br" />

            <TextView
                android:id="@+id/overlay_current_display"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/default_video_res" />
        </LinearLayout>

        <!-- VIDEO PLAYER LAYOUT -->
        <include
            android:id="@+id/mediaplayer_layout"
            layout="@layout/player_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true" />
    </RelativeLayout>

</LinearLayout>
