<?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:icon="@drawable/ic_vibration"
        android:key="vibration_patterns_key"
        android:persistent="false"
        android:summary="@string/pref_screen_vibration_patterns_summary"
        android:title="@string/pref_screen_vibration_patterns_title">

        <PreferenceCategory android:title="@string/pref_screen_vibration_patterns_title" />

        <PreferenceScreen
            android:icon="@drawable/ic_settings_applications"
            android:key="vibration_profile_key_app_alerts"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_generic">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_generic" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_app_alerts"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="2"
                android:inputType="number"
                android:key="huami_vibration_count_app_alerts"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_app_alerts"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_phone"
            android:key="vibration_profile_key_incoming_call"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_incoming_call">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_incoming_call" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_incoming_call"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="1"
                android:inputType="number"
                android:key="huami_vibration_count_incoming_call"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_incoming_call"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_message_outline"
            android:key="vibration_profile_key_incoming_sms"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_sms">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_sms" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_incoming_sms"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="2"
                android:inputType="number"
                android:key="huami_vibration_count_incoming_sms"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_incoming_sms"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_star_gray"
            android:key="vibration_profile_key_goal_notification"
            android:persistent="false"
            android:title="@string/mi2_prefs_goal_notification">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/mi2_prefs_goal_notification" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_goal_notification"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="1"
                android:inputType="number"
                android:key="huami_vibration_count_goal_notification"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_goal_notification"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_access_alarms"
            android:key="vibration_profile_key_alarm"
            android:persistent="false"
            android:title="@string/vibration_profile_alarm_clock">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/vibration_profile_alarm_clock" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_alarm"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="7"
                android:inputType="number"
                android:key="huami_vibration_count_alarm"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_alarm"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_chair"
            android:key="vibration_profile_key_idle_alerts"
            android:persistent="false"
            android:title="@string/pref_screen_notification_idle_alerts">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_idle_alerts" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_idle_alerts"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="2"
                android:inputType="number"
                android:key="huami_vibration_count_idle_alerts"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_idle_alerts"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_device_set_reminders"
            android:key="vibration_profile_key_event_reminder"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_event_reminder">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_event_reminder" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_event_reminder"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="1"
                android:inputType="number"
                android:key="huami_vibration_count_event_reminder"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_event_reminder"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_action_find_lost_device"
            android:key="vibration_profile_key_find_band"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_find_device">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_find_device" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_find_band"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="1"
                android:inputType="number"
                android:key="huami_vibration_count_find_band"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_find_band"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_checklist"
            android:key="vibration_profile_key_todo_list"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_todo_list">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_todo_list" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_todo_list"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="2"
                android:inputType="number"
                android:key="huami_vibration_count_todo_list"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_todo_list"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>

        <PreferenceScreen
            android:icon="@drawable/ic_calendar_to"
            android:key="vibration_profile_key_schedule"
            android:persistent="false"
            android:title="@string/pref_screen_notification_profile_schedule">

            <!-- workaround for missing toolbar -->
            <PreferenceCategory android:title="@string/pref_screen_notification_profile_schedule" />

            <ListPreference
                android:defaultValue="@string/p_default"
                android:entries="@array/vibration_profile"
                android:entryValues="@array/vibration_profile_values"
                android:key="huami_vibration_profile_schedule"
                app:useSimpleSummaryProvider="true"
                android:title="@string/miband_prefs_vibration" />

            <EditTextPreference
                android:defaultValue="2"
                android:inputType="number"
                android:key="huami_vibration_count_schedule"
                android:maxLength="1"
                android:title="@string/pref_title_notifications_repetitions"
                app:useSimpleSummaryProvider="true" />

            <Preference
                android:key="huami_vibration_try_schedule"
                android:persistent="false"
                android:title="@string/vibration_try" />
        </PreferenceScreen>
    </PreferenceScreen>
</androidx.preference.PreferenceScreen>
