<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".fragment.SettingsFragment"
    android:background="?android:attr/colorBackground">

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

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/localization"
            android:textSize="16sp"
            android:textStyle="bold" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/language" />

        <Spinner
            android:id="@+id/settings_language"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="10dp"
            android:paddingBottom="10dp" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginVertical="10dp"
            android:background="@drawable/theme_gradient" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/security"
            android:textSize="16sp"
            android:textStyle="bold" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/settings_enable_encryption"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/enable_encryption" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/settings_biometric_lock"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/settings_biometric_lock" />

        <TextView
            android:id="@+id/settings_biometric_lock_info"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:visibility="gone"
            tools:visibility="visible"
            tools:text="Additional info when biometric auth is unavailable" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/settings_show_images"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/show_images" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginVertical="10dp"
            android:background="@drawable/theme_gradient" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/appearance"
            android:textSize="16sp"
            android:textStyle="bold" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/settings_enable_intro_video"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/settings_enable_intro_video" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/settings_enable_themed_background"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/settings_enable_themed_background" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/theme" />

        <Spinner
            android:id="@+id/settings_theme"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="10dp"
            android:paddingBottom="10dp" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/settings_enable_minimalist_theme"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/settings_enable_minimalist_theme" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/appearance" />

        <Spinner
            android:id="@+id/settings_appearance"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="10dp"
            android:paddingBottom="10dp" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginVertical="10dp"
            android:background="@drawable/theme_gradient" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/backups"
            android:textSize="16sp"
            android:textStyle="bold" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/settings_create_backup"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="?attr/buttonBackground"
            android:text="@string/create_backup"
            android:textAllCaps="false" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/settings_load_backup"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="?attr/buttonBackground"
            android:text="@string/load_backup"
            android:textAllCaps="false" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginVertical="10dp"
            android:background="@drawable/theme_gradient" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/settings_icon_packs"
            android:gravity="center"
            android:textSize="16sp"
            android:textStyle="bold" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/settings_load_icon_pack"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="?attr/buttonBackground"
            android:text="@string/settings_icon_packs_import"
            android:textAllCaps="false" />

        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/settings_manage_icon_packs"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:background="?attr/buttonBackground"
            android:text="@string/settings_icon_packs_manage"
            android:textAllCaps="false" />

        <Space
            android:layout_width="match_parent"
            android:layout_height="76dp" />

    </LinearLayout>
</androidx.core.widget.NestedScrollView>