<?xml version="1.0" encoding="utf-8"?><!--
    Copyright 2017 Thomas Schneider

    This file is a part of Fedilab

    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation; either version 3 of the
    License, or (at your option) any later version.

    Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    Public License for more details.

    You should have received a copy of the GNU General Public License along with Fedilab; if not,
    see <http://www.gnu.org/licenses>
-->
<androidx.drawerlayout.widget.DrawerLayout 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/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:openDrawer="start">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context="app.fedilab.android.activities.MainActivity">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?colorPrimary"
                app:layout_scrollFlags="scroll|enterAlways">

                <ImageView
                    android:id="@+id/iconbar"
                    android:layout_width="30dp"
                    android:layout_height="30dp"
                    android:contentDescription="@string/open_menu" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="40dp"
                    android:orientation="horizontal">

                    <TextView
                        android:id="@+id/toolbar_title"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginStart="10dp"
                        android:layout_weight="1"
                        android:textSize="16sp"
                        android:visibility="gone" />

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/tabLayout"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:background="?colorPrimary"
                        app:tabGravity="fill"
                        app:tabMaxWidth="0dp"
                        app:tabMode="scrollable"
                        app:tabSelectedTextColor="?colorAccent" />

                    <ImageView
                        android:id="@+id/delete_instance"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:contentDescription="@string/delete_instance"
                        android:src="@drawable/ic_delete"
                        android:visibility="gone" />

                    <ImageView
                        android:id="@+id/display_timeline"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginStart="5dp"
                        android:contentDescription="@string/display_timeline"
                        android:src="@drawable/ic_more_horiz_black"
                        android:visibility="gone" />

                    <androidx.appcompat.widget.SearchView
                        android:id="@+id/toolbar_search"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:gravity="end" />
                </LinearLayout>
            </androidx.appcompat.widget.Toolbar>

        </com.google.android.material.appbar.AppBarLayout>


        <!-- Framelayout to display Fragments -->
        <androidx.viewpager.widget.ViewPager
            android:id="@+id/viewpager"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            tools:context="app.fedilab.android.activities.MainActivity" />

        <!-- Framelayout to display Fragments -->
        <RelativeLayout
            android:id="@+id/main_app_container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            tools:context="app.fedilab.android.activities.MainActivity" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/toot"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="@dimen/fab_margin_floating"
            android:contentDescription="@string/toot_it"
            android:src="@drawable/ic_edit" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/delete_all"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="@dimen/fab_margin_floating"
            android:contentDescription="@string/delete_all"
            android:src="@drawable/ic_delete_floating"
            android:visibility="gone" />

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/add_new"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="@dimen/fab_margin_floating"
            android:contentDescription="@string/add_new"
            android:src="@drawable/ic_action_add_new"
            android:visibility="gone" />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <com.google.android.material.navigation.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@color/cyanea_primary_dark_reference"
        android:fitsSystemWindows="false"
        app:headerLayout="@layout/nav_header_main"
        app:itemTextColor="?attr/textColor"
        app:menu="@menu/activity_main_drawer" />

</androidx.drawerlayout.widget.DrawerLayout>
