<?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">

    <PreferenceScreen
        android:key="button_configuration"
        android:icon="@drawable/ic_smart_button"
        android:title="@string/pref_title_physical_buttons"
        android:summary="@string/pref_summary_physical_buttons">
        <ListPreference
            android:defaultValue="weatherApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_1_function_short"
            android:summary="%s"
            android:title="@string/pref_title_upper_button_function_short" />
        <ListPreference
            android:defaultValue="weatherApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_1_function_long"
            android:summary="%s"
            android:title="@string/pref_title_upper_button_function_long" />
        <!-- supported FW does not support double click
        <ListPreference
            android:defaultValue="weatherApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_1_function_double"
            android:summary="%s"
            android:title="@string/pref_title_upper_button_function_double" />
            -->

        <ListPreference
            android:defaultValue="commuteApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_2_function_short"
            android:summary="%s"
            android:title="@string/pref_title_middle_button_function_short" />
        <!-- supported FW does not support double click
        <ListPreference
            android:defaultValue="commuteApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_2_function_double"
            android:summary="%s"
            android:title="@string/pref_title_middle_button_function_double" />
            -->

        <ListPreference
            android:defaultValue="musicApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_3_function_short"
            android:summary="%s"
            android:title="@string/pref_title_lower_button_function_short" />
        <ListPreference
            android:defaultValue="musicApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_3_function_long"
            android:summary="%s"
            android:title="@string/pref_title_lower_button_function_long" />
        <!-- supported FW does not support double click
        <ListPreference
            android:defaultValue="musicApp"
            android:entries="@array/pref_hybridhr_buttonfunctions"
            android:entryValues="@array/pref_hybridhr_buttonfunctions_values"
            android:key="button_3_function_double"
            android:summary="%s"
            android:title="@string/pref_title_lower_button_function_double" />
            -->
    </PreferenceScreen>

    <Preference
        android:title="@string/qhybrid_pref_title_actions"
        android:icon="@drawable/ic_pending_actions"
        android:summary="@string/qhybrid_pref_summary_actions">
        <intent
            android:targetPackage="nodomain.freeyourgadget.gadgetbridge"
            android:targetClass="nodomain.freeyourgadget.gadgetbridge.devices.qhybrid.CommuteActionsActivity" />
    </Preference>

    <SeekBarPreference
        android:defaultValue="2"
        android:icon="@drawable/ic_vibration"
        android:key="vibration_strength"
        android:max="3"
        android:title="@string/pref_title_vibration_strength"
        app:showSeekBarValue="true" />

    <Preference
        android:title="@string/qhybrid_title_calibration"
        android:icon="@drawable/ic_sensor_calibration"
        android:summary="@string/qhybrid_summary_calibration">
        <intent
            android:targetPackage="nodomain.freeyourgadget.gadgetbridge"
            android:targetClass="nodomain.freeyourgadget.gadgetbridge.devices.qhybrid.CalibrationActivity" />
    </Preference>

    <PreferenceScreen
        android:key="developer_settings"
        android:icon="@drawable/ic_developer_mode"
        android:title="@string/pref_title_developer_settings"
        android:summary="@string/pref_summary_developer_settings">

        <SwitchPreference
            android:defaultValue="false"
            android:key="save_raw_activity_files"
            android:title="@string/pref_qhybrid_save_raw_activity_files" />

        <SwitchPreference
            android:defaultValue="false"
            android:key="dangerous_external_intents"
            android:title="@string/qhybrid_pref_title_external_intents"
            android:summary="@string/qhybrid_pref_summary_external_intents" />

        <Preference
            android:title="@string/qhybrid_title_file_management"
            android:summary="@string/qhybrid_summary_file_management">
            <intent
                android:targetPackage="nodomain.freeyourgadget.gadgetbridge"
                android:targetClass="nodomain.freeyourgadget.gadgetbridge.devices.qhybrid.FileManagementActivity" />
        </Preference>

    </PreferenceScreen>

</androidx.preference.PreferenceScreen>
