<?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"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        android:orientation="vertical">

        <com.google.android.material.appbar.AppBarLayout
            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="?attr/actionBarSize" />

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

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.coordinatorlayout.widget.CoordinatorLayout
                android:id="@+id/main_content"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <com.google.android.material.progressindicator.LinearProgressIndicator
                        android:id="@+id/progress_bar"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:indeterminate="true"
                        android:visibility="invisible"
                        app:indicatorColor="@color/color_fab_active" />

                    <com.google.android.material.tabs.TabLayout
                        android:id="@+id/tab_group"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:tabIndicatorFullWidth="false"
                        app:tabMode="scrollable"
                        app:tabTextAppearance="@style/TabLayoutTextStyle" />

                    <androidx.viewpager2.widget.ViewPager2
                        android:id="@+id/view_pager"
                        android:layout_width="match_parent"
                        android:layout_height="0dp"
                        android:nextFocusRight="@+id/fab"
                        android:scrollbars="vertical"
                        android:layout_weight="1" />

                    <LinearLayout
                        android:id="@+id/layout_test"
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/view_height_dp64"
                        android:clickable="true"
                        android:contentDescription="@string/connection_test_pending"
                        android:focusable="true"
                        android:nextFocusLeft="@+id/view_pager"
                        android:nextFocusRight="@+id/fab"
                        android:orientation="vertical">

                        <View
                            android:layout_width="wrap_content"
                            android:layout_height="1dp"
                            android:background="@color/divider_color_light" />

                        <TextView
                            android:id="@+id/tv_test_state"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:gravity="start|center"
                            android:maxLines="2"
                            android:minLines="1"
                            android:paddingStart="@dimen/padding_spacing_dp16"
                            android:text="@string/connection_test_pending"
                            android:textAppearance="@style/TextAppearance.AppCompat.Small" />

                    </LinearLayout>
                </LinearLayout>

                <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom|end"
                    android:layout_marginBottom="-16dp"
                    android:layout_marginEnd="@dimen/padding_spacing_dp16">

                    <com.google.android.material.floatingactionbutton.FloatingActionButton
                        android:id="@+id/fab"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="bottom|end"
                        android:layout_marginBottom="@dimen/view_height_dp36"
                        android:clickable="true"
                        android:contentDescription="@string/tasker_start_service"
                        android:focusable="true"
                        android:nextFocusLeft="@+id/layout_test"
                        android:src="@drawable/ic_play_24dp"
                        app:tint="@color/colorWhite"
                        app:useCompatPadding="true"
                        app:layout_anchorGravity="bottom|right|end" />

                </FrameLayout>

                <FrameLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom|end"
                    android:layout_marginBottom="110dp"
                    android:layout_marginEnd="16dp">

                    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
                        android:id="@+id/btn_summary_lite"
                        android:layout_width="56dp"
                        android:layout_height="56dp"
                        android:padding="0dp"
                        android:text="L"
                        android:textAlignment="center"
                        android:textColor="@color/colorWhite"
                        app:backgroundTint="@color/color_fab_inactive" />
                </FrameLayout>
            </androidx.coordinatorlayout.widget.CoordinatorLayout>
        </RelativeLayout>
    </LinearLayout>

    <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"
        app:headerLayout="@layout/nav_header"
        app:menu="@menu/menu_drawer">

    </com.google.android.material.navigation.NavigationView>

</androidx.drawerlayout.widget.DrawerLayout>
