<?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.drawerlayout.widget.DrawerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/top_app_bar_layout"
            style="@style/Widget.Kore.Toolbar">
            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/default_toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_scrollFlags="scroll|enterAlways|snap"
                style="@style/Widget.Kore.Toolbar" />
        </com.google.android.material.appbar.AppBarLayout>

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/fragment_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/fab_play"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="@dimen/fab_normal_margin"
            android:layout_marginBottom="@dimen/fab_normal_margin"
            android:layout_gravity="bottom|end"
            android:visibility="gone"
            android:contentDescription="@string/play"
            app:layout_behavior=".ui.behaviors.HideOnVerticalScrollBehavior"
            app:layout_dodgeInsetEdges="bottom"
            app:fabSize="normal"
            app:useCompatPadding="true"
            style="?attr/floatingActionButtonPrimaryStyle"
            app:srcCompat="@drawable/ic_round_play_arrow_24"/>

        <org.xbmc.kore.ui.widgets.NowPlayingPanel
            android:id="@+id/now_playing_panel"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:gravity="bottom"
            android:background="@drawable/background_round_top"
            style="@style/Widget.Kore.BottomPanel"
            app:behavior_hideable="true"
            app:behavior_peekHeight="@dimen/now_playing_panel_heigth"
            app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
            app:layout_insetEdge="bottom"/>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <androidx.fragment.app.FragmentContainerView
        android:id="@+id/navigation_drawer"
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:name="org.xbmc.kore.ui.generic.NavigationDrawerFragment"/>

</androidx.drawerlayout.widget.DrawerLayout>
