<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.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"
                                        tools:context="com.stardust.scriptdroid.ui.main.MainActivity">


    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <ImageView
            android:id="@+id/app_bar_bg"
            android:layout_width="match_parent"
            android:layout_height="128.5dp"
            android:scaleType="fitXY"
            android:src="@drawable/toolbar_bg"/>

        <android.support.design.widget.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:clipToPadding="false"
            android:paddingTop="24dp"
            android:theme="@style/AppTheme.AppBarOverlay">


            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:title="@string/_app_name"
                app:popupTheme="@style/AppTheme.PopupOverlay">

                <ImageView
                    android:id="@+id/add"
                    android:layout_width="?android:attr/actionBarSize"
                    android:layout_height="match_parent"
                    android:layout_gravity="right"
                    android:foreground="?selectableItemBackgroundBorderless"
                    android:padding="12dp"
                    android:src="@drawable/ic_add_white_48dp"/>

            </android.support.v7.widget.Toolbar>

            <android.support.design.widget.TabLayout
                android:id="@+id/tab"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                app:tabGravity="fill"
                app:tabIndicatorColor="@android:color/white"
                app:tabMode="fixed"
                app:tabSelectedTextColor="@android:color/primary_text_dark"
                app:tabTextColor="@android:color/secondary_text_dark"/>

        </android.support.design.widget.AppBarLayout>

        <include
            android:id="@+id/content_main"
            layout="@layout/content_main"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

        <com.stardust.widget.SlidingUpPanel
            android:id="@+id/bottom_menu"
            android:layout_width="match_parent"
            android:layout_height="match_parent">


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="160dp"
                android:background="@android:color/white"
                android:baselineAligned="false"
                android:gravity="center"
                android:orientation="horizontal">


                <LinearLayout
                    android:id="@+id/create_new_file"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:gravity="center"
                    android:orientation="vertical">

                    <com.stardust.theme.widget.ThemeColorImageViewCompat
                        android:layout_width="60dp"
                        android:layout_height="60dp"
                        android:padding="10dp"
                        android:src="@drawable/ic_add_file"/>

                    <com.stardust.theme.widget.ThemeColorTextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:text="@string/text_new_file"
                        android:textColor="@color/colorPrimary"
                        android:textSize="16sp"/>

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/create_new_directory"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:gravity="center"
                    android:orientation="vertical">

                    <com.stardust.theme.widget.ThemeColorImageViewCompat
                        android:layout_width="60dp"
                        android:layout_height="60dp"
                        android:padding="10dp"
                        android:src="@drawable/ic_new_directory"/>

                    <com.stardust.theme.widget.ThemeColorTextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:text="@string/text_new_directory"
                        android:textColor="@color/colorPrimary"
                        android:textSize="16sp"/>

                </LinearLayout>


                <LinearLayout
                    android:id="@+id/import_from_file"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:gravity="center"
                    android:orientation="vertical">

                    <com.stardust.theme.widget.ThemeColorImageViewCompat
                        android:layout_width="60dp"
                        android:layout_height="60dp"
                        android:padding="10dp"
                        android:src="@drawable/ic_import"/>

                    <com.stardust.theme.widget.ThemeColorTextView
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:text="@string/text_import_from_file"
                        android:textColor="@color/colorPrimary"
                        android:textSize="16sp"/>

                </LinearLayout>

            </LinearLayout>

        </com.stardust.widget.SlidingUpPanel>

    </android.support.design.widget.CoordinatorLayout>

    <include
        android:id="@+id/drawer"
        layout="@layout/drawer"
        android:layout_width="304dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="false"
        />
</android.support.v4.widget.DrawerLayout>

