<!--
  TimeLimit Copyright <C> 2019 Jonas Lochmann
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation version 3 of the License.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context="io.timelimit.android.ui.manage.child.apps.ChildAppsFragment">

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

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <LinearLayout
                android:background="?android:windowBackground"
                app:layout_scrollFlags="scroll|enterAlways|snap"
                android:orientation="vertical"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <include layout="@layout/app_filter_view"
                    android:id="@+id/app_filter" />

                <CheckBox
                    android:checked="false"
                    android:id="@+id/show_apps_from_unassigned_devices"
                    android:text="@string/category_apps_add_dialog_show_from_other_devices"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

                <RadioGroup
                    android:id="@+id/sort_setting"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <RadioButton
                        android:checked="true"
                        android:id="@+id/sort_by_category"
                        android:text="@string/child_apps_sort_by_category"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />

                    <RadioButton
                        android:id="@+id/sort_by_title"
                        android:text="@string/child_apps_sort_by_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />

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

        <androidx.recyclerview.widget.RecyclerView
            app:layout_behavior="@string/appbar_scrolling_view_behavior"
            android:id="@+id/recycler"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

</layout>
