<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <PreferenceCategory
        android:key="pref_key_header_redmibuds5pro_system"
        android:title="@string/pref_header_system">

        <PreferenceScreen
            android:icon="@drawable/ic_touch"
            android:key="pref_screen_redmibuds5pro_touch_options"
            android:persistent="false"
            android:title="@string/prefs_galaxy_touch_options">

            <PreferenceCategory android:title="@string/single_tap">
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_single_button_function_names"
                    android:entryValues="@array/redmi_buds_5_pro_single_button_function_values"
                    android:icon="@drawable/ic_filter_1"
                    android:defaultValue="8"
                    android:key="pref_redmi_buds_5_pro_control_single_tap_left"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/prefs_left" />
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_single_button_function_names"
                    android:entryValues="@array/redmi_buds_5_pro_single_button_function_values"
                    android:defaultValue="8"
                    android:key="pref_redmi_buds_5_pro_control_single_tap_right"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/prefs_right" />
            </PreferenceCategory>

            <PreferenceCategory android:title="@string/double_tap">
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_button_function_names"
                    android:entryValues="@array/redmi_buds_5_pro_button_function_values"
                    android:icon="@drawable/ic_filter_2"
                    android:defaultValue="1"
                    android:key="pref_redmi_buds_5_pro_control_double_tap_left"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/prefs_left" />
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_button_function_names"
                    android:entryValues="@array/redmi_buds_5_pro_button_function_values"
                    android:defaultValue="1"
                    android:key="pref_redmi_buds_5_pro_control_double_tap_right"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/prefs_right" />
            </PreferenceCategory>

            <PreferenceCategory android:title="@string/triple_tap">
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_button_function_names"
                    android:entryValues="@array/redmi_buds_5_pro_button_function_values"
                    android:icon="@drawable/ic_filter_3"
                    android:defaultValue="2"
                    android:key="pref_redmi_buds_5_pro_control_triple_tap_left"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/prefs_left" />
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_button_function_names"
                    android:entryValues="@array/redmi_buds_5_pro_button_function_values"
                    android:defaultValue="3"
                    android:key="pref_redmi_buds_5_pro_control_triple_tap_right"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/prefs_right" />
            </PreferenceCategory>

            <PreferenceCategory android:title="@string/long_press">
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_long_button_mode_names"
                    android:entryValues="@array/redmi_buds_5_pro_long_button_mode_values"
                    android:icon="@drawable/ic_touch"
                    android:defaultValue="6"
                    android:key="pref_redmi_buds_5_pro_control_long_tap_mode_left"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/sony_button_mode_left" />
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_long_button_settings_names"
                    android:entryValues="@array/redmi_buds_5_pro_long_button_settings_values"
                    android:defaultValue="7"
                    android:key="pref_redmi_buds_5_pro_control_long_tap_settings_left"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/sony_ambient_sound_control_button_modes" />
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_long_button_mode_names"
                    android:entryValues="@array/redmi_buds_5_pro_long_button_mode_values"
                    android:icon="@drawable/ic_touch"
                    android:defaultValue="6"
                    android:key="pref_redmi_buds_5_pro_control_long_tap_mode_right"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/sony_button_mode_right" />
                <ListPreference
                    android:entries="@array/redmi_buds_5_pro_long_button_settings_names"
                    android:entryValues="@array/redmi_buds_5_pro_long_button_settings_values"
                    android:defaultValue="7"
                    android:key="pref_redmi_buds_5_pro_control_long_tap_settings_right"
                    app:useSimpleSummaryProvider="true"
                    android:title="@string/sony_ambient_sound_control_button_modes" />
            </PreferenceCategory>
        </PreferenceScreen>

        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="pref_redmi_buds_5_pro_wearing_detection"
            android:layout="@layout/preference_checkbox"
            android:icon="@drawable/ic_pause"
            android:summary="@string/nothing_prefs_inear_summary"
            android:title="@string/nothing_prefs_inear_title"/>

        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:icon="@drawable/ic_phone"
            android:key="pref_redmi_buds_5_pro_auto_reply_phonecall"
            android:summary="@string/pref_auto_reply_calls_summary"
            android:title="@string/pref_auto_reply_calls_title"/>

        <SwitchPreferenceCompat
            android:defaultValue="false"
            android:key="pref_redmi_buds_5_pro_double_connection"
            android:summary="@string/redmi_buds_5_pro_double_connection_description"
            android:title="@string/redmi_buds_5_pro_double_connection"/>

    </PreferenceCategory>
</androidx.preference.PreferenceScreen>
