<?xml version="1.0" encoding="utf-8"?>
<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"
        tools:context="org.autojs.autojs.ui.main.MainActivity">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipChildren="false"
            android:clipToPadding="false">

        <com.google.android.material.appbar.AppBarLayout
                android:id="@+id/app_bar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:theme="@style/AppTheme.AppBarOverlay"
                android:clipToPadding="true"
                android:fitsSystemWindows="true">

            <org.autojs.autojs.theme.widget.ThemeColorToolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    android:theme="@style/ToolBarStyle"
                    android:title="@string/app_name"
                    app:layout_scrollFlags="enterAlways"
                    app:popupTheme="@style/PopupMenuTheme" />

            <com.google.android.material.tabs.TabLayout
                    android:id="@+id/tab"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    app:tabGravity="fill"
                    app:tabMaxWidth="0dp"
                    app:tabIndicatorColor="@color/tab_indicator"
                    app:tabMode="fixed"
                    app:tabSelectedTextColor="@color/tab_selected_text"
                    app:tabTextColor="@color/tab_text" />

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

        <org.autojs.autojs.ui.pager.ViewPager
                android:id="@+id/viewpager"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:layout_behavior="@string/appbar_scrolling_view_behavior" />

        <org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
                android:id="@+id/fab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end|bottom"
                android:layout_margin="16dp"
                android:src="@drawable/ic_add_white_48dp"
                android:tint="@color/toolbar_text"
                app:backgroundTint="?attr/colorPrimary"
                app:layout_anchor="@id/viewpager"
                app:layout_anchorGravity="bottom|end"
                app:layout_behavior="org.autojs.autojs.ui.widget.ScrollAwareFABBehavior"
                android:alpha="0.9" />

        <org.autojs.autojs.ui.main.FloatingActionMenu
                android:id="@+id/floating_action_menu"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end|bottom"
                android:layout_margin="16dp"
                android:clipChildren="false"
                android:clipToPadding="false"
                android:visibility="invisible"
                app:layout_anchor="@id/viewpager"
                app:layout_anchorGravity="bottom|end" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <androidx.fragment.app.FragmentContainerView
            android:id="@+id/fragment_drawer"
            android:name="org.autojs.autojs.ui.main.drawer.DrawerFragment"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:fitsSystemWindows="false"
            tools:layout="@layout/fragment_drawer" />

</androidx.drawerlayout.widget.DrawerLayout>

