<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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/main_coordinator"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/main_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/color_primary"
            app:menu="@menu/menu"
            app:title="@string/app_launcher_name"
            app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />

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

    <androidx.core.widget.NestedScrollView
        android:id="@+id/main_nested_scrollview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:scrollbars="none"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

            <RelativeLayout
                android:id="@+id/launchers_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <com.simplemobiletools.commons.views.MyTextView
                    android:id="@+id/no_items_placeholder"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_centerHorizontal="true"
                    android:alpha="0.8"
                    android:gravity="center"
                    android:paddingStart="@dimen/activity_margin"
                    android:paddingTop="@dimen/activity_margin"
                    android:paddingEnd="@dimen/activity_margin"
                    android:text="@string/no_items_found"
                    android:textSize="@dimen/bigger_text_size"
                    android:textStyle="italic"
                    android:visibility="gone"
                    tools:visibility="visible" />

                <com.simplemobiletools.commons.views.MyTextView
                    android:id="@+id/add_icons_placeholder"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/no_items_placeholder"
                    android:layout_centerHorizontal="true"
                    android:background="@drawable/ripple_all_corners"
                    android:gravity="center"
                    android:padding="@dimen/activity_margin"
                    android:text="@string/manage_visible_app_icons"
                    android:textSize="@dimen/bigger_text_size"
                    android:visibility="gone"
                    tools:visibility="visible" />

                <com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller
                    android:id="@+id/launchers_fastscroller"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <com.simplemobiletools.commons.views.MyRecyclerView
                        android:id="@+id/launchers_grid"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:clipToPadding="false"
                        app:layoutManager="com.simplemobiletools.commons.views.MyGridLayoutManager"
                        app:spanCount="@integer/portrait_column_count" />

                </com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller>
            </RelativeLayout>

            <com.simplemobiletools.commons.views.MyFloatingActionButton
                android:id="@+id/fab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|end"
                android:layout_margin="@dimen/activity_margin"
                android:src="@drawable/ic_plus_vector" />

        </androidx.coordinatorlayout.widget.CoordinatorLayout>
    </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
