<?xml version="1.0" encoding="utf-8"?><!--
   Copyright 2015 Synced Synapse. All rights reserved.

   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.
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- Right button bar -->
    <LinearLayout
        android:id="@+id/sections_button_bar"
        android:layout_width="@dimen/buttonbar_height"
        android:layout_height="match_parent"
        style="@style/Widget.Kore.BottomPanel"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent">

        <ImageButton
            android:id="@+id/home"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/home"
            android:src="@drawable/ic_round_dashboard_24" />

        <ImageButton
            android:id="@+id/movies"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/movies"
            android:src="@drawable/ic_round_movie_24" />

        <ImageButton
            android:id="@+id/tv_shows"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/tv_shows"
            android:src="@drawable/ic_round_tv_24" />

        <ImageButton
            android:id="@+id/music"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/music"
            android:src="@drawable/ic_round_headphones_24" />

        <ImageButton
            android:id="@+id/pvr"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/pvr"
            android:src="@drawable/ic_round_dvr_24" />

        <ImageButton
            android:id="@+id/pictures"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/pictures"
            android:src="@drawable/ic_round_image_24" />

        <ImageButton
            android:id="@+id/videos"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/videos"
            android:src="@drawable/ic_round_local_movies_24" />

        <ImageButton
            android:id="@+id/addons"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/addons"
            android:src="@drawable/ic_round_extension_24" />

        <ImageButton
            android:id="@+id/weather"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/weather"
            android:src="@drawable/ic_round_wb_sunny_24" />

        <ImageButton
            android:id="@+id/system"
            style="@style/Widget.Kore.Button.Borderless"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:contentDescription="@string/system"
            android:src="@drawable/ic_round_settings_24" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        app:layout_constraintEnd_toStartOf="@+id/sections_button_bar"
        app:layout_constraintStart_toStartOf="parent">

        <include
            android:id="@+id/include_info_panel"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            layout="@layout/info_panel" />

        <RelativeLayout
            android:id="@+id/media_panel"
            style="@style/Widget.Kore.InfoPanel.Remote"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginStart="@dimen/info_panel_horiz_margin">

            <com.google.android.material.imageview.ShapeableImageView
                android:id="@+id/poster"
                android:layout_width="@dimen/remote_poster_width"
                android:layout_height="@dimen/remote_poster_height"
                android:layout_alignParentStart="true"
                android:contentDescription="@string/poster"
                android:scaleType="centerCrop"
                app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.Kore.Image.PosterRemote" />

            <TextView
                android:id="@+id/title"
                style="@style/Widget.Kore.TextView.MediaTitle.Remote"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_toEndOf="@id/poster" />

            <TextView
                android:id="@+id/details"
                style="@style/Widget.Kore.TextView.MediaDetails.Remote"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/title"
                android:layout_alignStart="@id/title" />

            <!-- Media playback control buttons -->
            <org.xbmc.kore.ui.widgets.MediaPlaybackBar
                android:id="@+id/media_playback_bar"
                android:layout_width="match_parent"
                android:layout_height="@dimen/buttonbar_height"
                android:layout_below="@id/details"
                android:layout_alignStart="@id/details"
                android:layout_alignBottom="@+id/poster"
                android:orientation="horizontal" />

            <!-- Progress bar -->
            <org.xbmc.kore.ui.widgets.MediaProgressIndicator
                android:id="@+id/progress_info"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/poster"
                android:layout_alignStart="@id/poster"
                android:orientation="horizontal"
                android:paddingLeft="@dimen/small_padding"
                android:paddingTop="@dimen/default_padding"
                android:paddingRight="@dimen/small_padding" />

            <!-- Media action buttons -->
            <org.xbmc.kore.ui.widgets.MediaActionsBar
                android:id="@+id/media_actions_bar"
                android:layout_width="match_parent"
                android:layout_height="@dimen/buttonbar_height"
                android:layout_below="@id/progress_info"
                android:layout_alignStart="@id/poster"
                android:orientation="horizontal" />

        </RelativeLayout>

        <org.xbmc.kore.ui.widgets.ControlPad
            android:id="@+id/remote"
            style="@style/Widget.Kore.ControlPad"
            android:layout_width="@dimen/control_pad_size"
            android:layout_height="@dimen/control_pad_size"
            android:layout_gravity="center" />

    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
