<?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="true"
                        app:tabMode="fixed"
                        app:tabGravity="fill"
                        app:tabMaxWidth="0dp"
                        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:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

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

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:gravity="center"
                            android:paddingTop="12dp"
                            android:paddingBottom="8dp">

                            <com.google.android.material.floatingactionbutton.FloatingActionButton
                                android:id="@+id/btn_summary_lite"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginEnd="16dp"
                                android:clickable="true"
                                android:focusable="true"
                                android:src="@drawable/ic_lite_bolt"
                                app:tint="@color/colorWhite"
                                app:backgroundTint="@color/color_fab_inactive"
                                app:fabSize="normal"
                                app:maxImageSize="28dp"
                                app:elevation="4dp"
                                app:pressedTranslationZ="8dp"
                                app:hoveredFocusedTranslationZ="6dp" />

                            <com.google.android.material.floatingactionbutton.FloatingActionButton
                                android:id="@+id/fab"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                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:fabSize="normal"
                                app:maxImageSize="28dp"
                                app:elevation="4dp"
                                app:pressedTranslationZ="8dp"
                                app:hoveredFocusedTranslationZ="6dp" />

                        </LinearLayout>

                        <LinearLayout
                            android:id="@+id/layout_test"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:clickable="true"
                            android:contentDescription="@string/connection_test_pending"
                            android:focusable="true"
                            android:nextFocusLeft="@+id/view_pager"
                            android:nextFocusRight="@+id/fab"
                            android:orientation="vertical"
                            android:gravity="center"
                            android:paddingTop="4dp"
                            android:paddingBottom="12dp"
                            android:paddingStart="16dp"
                            android:paddingEnd="16dp">

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

                        </LinearLayout>
                    </LinearLayout>
                </LinearLayout>


            </androidx.coordinatorlayout.widget.CoordinatorLayout>
        </RelativeLayout>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="?android:attr/windowBackground"
        android:orientation="vertical">

        <com.google.android.material.navigation.NavigationView
            android:id="@+id/nav_view"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            app:headerLayout="@layout/nav_header" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="16dp">

            <TextView
                android:id="@+id/drawer_settings"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:drawablePadding="12dp"
                android:gravity="center_vertical"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:text="@string/title_settings"
                android:textAppearance="@style/TextAppearance.AppCompat.Body1"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true" />

            <TextView
                android:id="@+id/drawer_per_app"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:drawablePadding="12dp"
                android:gravity="center_vertical"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:text="@string/per_app_proxy_settings"
                android:textAppearance="@style/TextAppearance.AppCompat.Body1"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true" />

            <TextView
                android:id="@+id/drawer_check_update"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:drawablePadding="12dp"
                android:gravity="center_vertical"
                android:paddingTop="12dp"
                android:paddingBottom="16dp"
                android:text="@string/update_check_for_update"
                android:textAppearance="@style/TextAppearance.AppCompat.Body1"
                android:background="?attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true" />

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

            <TextView
                android:id="@+id/tv_forked"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/drawer_forked_text"
                android:textColor="#9E9E9E"
                android:textColorLink="#9E9E9E"
                android:linksClickable="true"
                android:textIsSelectable="true" />

            <TextView
                android:id="@+id/tv_developed"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/drawer_developed_text"
                android:textColor="#9E9E9E"
                android:textColorLink="#9E9E9E"
                android:linksClickable="true"
                android:textIsSelectable="true" />
        </LinearLayout>
    </LinearLayout>

</androidx.drawerlayout.widget.DrawerLayout>
