<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <PreferenceCategory app:title="@string/downloads">

        <ListPreference
            android:defaultValue="downloads"
            android:entries="@array/downloadLocation"
            android:entryValues="@array/downloadLocationValues"
            app:icon="@drawable/ic_download_filled"
            app:key="download_location"
            app:summary="@string/download_directory_summary"
            app:title="@string/download_directory" />

        <EditTextPreference
            android:defaultValue="LibreTube"
            app:icon="@drawable/ic_folder"
            app:key="download_folder"
            app:summary="@string/download_folder_summary"
            app:title="@string/download_folder" />

    </PreferenceCategory>

    <PreferenceCategory app:title="@string/share">

        <SwitchPreferenceCompat
            app:defaultValue="true"
            app:icon="@drawable/ic_time"
            app:key="share_with_time_code"
            app:title="@string/share_with_time" />

    </PreferenceCategory>

    <PreferenceCategory app:title="@string/advanced">

        <SwitchPreferenceCompat
            android:icon="@drawable/ic_data_saver"
            android:summary="@string/data_saver_mode_summary"
            app:key="data_saver_mode"
            app:title="@string/data_saver_mode" />

        <ListPreference
            android:entries="@array/cacheSize"
            android:entryValues="@array/cacheSizeValues"
            android:icon="@drawable/ic_cache"
            app:defaultValue="128"
            app:key="image_cache_size"
            app:title="@string/maximum_image_cache"
            app:useSimpleSummaryProvider="true" />

        <Preference
            android:icon="@drawable/ic_reset"
            app:key="reset_settings"
            app:title="@string/reset" />

    </PreferenceCategory>

    <PreferenceCategory app:title="@string/backup_restore">

        <Preference
            android:icon="@drawable/ic_backup"
            app:key="backup_settings"
            app:title="@string/backup" />

        <Preference
            android:icon="@drawable/ic_restore"
            app:key="restore_settings"
            app:title="@string/restore" />

    </PreferenceCategory>

</PreferenceScreen>