<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:transitionGroup="true">

    <androidx.cardview.widget.CardView
        android:id="@+id/settings_toolbar"
        style="@style/Toolbar">

        <ImageButton
            android:id="@+id/settings_btn_back"
            style="@style/ToolbarButton"
            android:layout_gravity="start|center_vertical"
            android:contentDescription="@string/btn_back"
            android:src="@drawable/ic_back" />

        <TextView
            android:id="@+id/settings_title"
            style="@style/ToolbarTitle"
            android:text="@string/btn_settings" />

    </androidx.cardview.widget.CardView>

    <androidx.cardview.widget.CardView
        style="@style/Toolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="@dimen/view_default_margin"
        android:layout_marginTop="@dimen/surface_margin_top"
        android:layout_marginEnd="@dimen/view_default_margin"
        android:layout_marginBottom="@dimen/surface_margin_bot"
        android:backgroundTint="@color/background">

        <androidx.core.widget.NestedScrollView
            android:id="@+id/settings_scroll"
            style="@style/Recycler"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <include
                    android:id="@+id/settings_about"
                    layout="@layout/card_about"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <include
                    android:id="@+id/settings_location"
                    layout="@layout/card_location"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/view_default_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/settings_about" />

                <include
                    android:id="@+id/settings_data"
                    layout="@layout/card_data"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/view_default_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/settings_location" />

                <include
                    android:id="@+id/settings_remote"
                    layout="@layout/card_remote"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/view_default_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/settings_data" />

                <include
                    android:id="@+id/settings_btremote"
                    layout="@layout/card_btremote"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/view_default_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/settings_remote" />

                <include
                    android:id="@+id/settings_other"
                    layout="@layout/card_other"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/view_default_margin"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/settings_btremote" />

                <include
                    android:id="@+id/settings_outro"
                    layout="@layout/card_outro"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/view_default_margin"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/settings_other" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.core.widget.NestedScrollView>

    </androidx.cardview.widget.CardView>

    <com.google.android.material.bottomappbar.BottomAppBar
        android:id="@+id/settings_bottom_bar"
        style="@style/BottomBar">

        <Button
            android:id="@+id/settings_btn_github"
            style="@style/NormalButton"
            android:layout_width="@dimen/button_width_max"
            android:layout_marginStart="@dimen/button_margin_side"
            android:layout_gravity="start|center_vertical"
            android:text="@string/btn_github" />

        <Button
            android:id="@+id/settings_btn_fdroid"
            style="@style/NormalButton"
            android:layout_width="@dimen/button_width_max"
            android:layout_marginEnd="@dimen/button_margin_side"
            android:layout_gravity="end|center_vertical"
            android:text="@string/btn_fdroid" />

    </com.google.android.material.bottomappbar.BottomAppBar>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/settings_fab"
        style="@style/FloatingActionButton"
        android:src="@drawable/ic_support"
        android:contentDescription="@string/btn_support"
        app:layout_anchor="@id/settings_bottom_bar" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
