2019-11-14 12:33:36 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<PreferenceScreen
|
|
|
|
android:key="screen_button_actions"
|
|
|
|
android:persistent="false"
|
|
|
|
android:summary="@string/mi2_prefs_button_actions_summary"
|
|
|
|
android:title="@string/mi2_prefs_button_actions">
|
|
|
|
|
|
|
|
<!-- workaround for missing toolbar -->
|
|
|
|
<PreferenceCategory android:title="@string/mi2_prefs_button_action" />
|
|
|
|
|
|
|
|
public static final String PREF_BUTTON_ACTION_PRESS_DELAY = "button_action_press_count_delay";
|
|
|
|
|
2019-11-21 13:24:06 +01:00
|
|
|
<SwitchPreference
|
2019-11-14 12:33:36 +01:00
|
|
|
android:defaultValue="false"
|
|
|
|
android:key="button_action_enable"
|
|
|
|
android:summary="@string/mi2_prefs_button_action_summary"
|
|
|
|
android:title="@string/mi2_prefs_button_action" />
|
|
|
|
|
2019-11-21 13:24:06 +01:00
|
|
|
<SwitchPreference
|
2019-11-14 12:33:36 +01:00
|
|
|
android:defaultValue="false"
|
|
|
|
android:dependency="button_action_enable"
|
|
|
|
android:key="button_action_vibrate"
|
|
|
|
android:summary="@string/mi2_prefs_button_action_vibrate_summary"
|
|
|
|
android:title="@string/mi2_prefs_button_action_vibrate" />
|
|
|
|
|
2020-01-08 19:58:31 +01:00
|
|
|
<ListPreference
|
2019-11-14 12:33:36 +01:00
|
|
|
android:dependency="button_action_enable"
|
2020-01-08 19:58:31 +01:00
|
|
|
android:entries="@array/button_action_options"
|
|
|
|
android:entryValues="@array/button_action_values"
|
|
|
|
android:key="button_single_press_action_selection"
|
|
|
|
android:defaultValue="@string/pref_button_action_disabled_value"
|
|
|
|
android:summary="%s"
|
2020-01-08 20:01:13 +01:00
|
|
|
android:title="@string/prefs_button_single_press_action_selection_title" />
|
2019-11-14 12:33:36 +01:00
|
|
|
|
2020-01-08 19:58:31 +01:00
|
|
|
<ListPreference
|
2019-11-14 12:33:36 +01:00
|
|
|
android:dependency="button_action_enable"
|
2020-01-08 19:58:31 +01:00
|
|
|
android:entries="@array/button_action_options"
|
|
|
|
android:entryValues="@array/button_action_values"
|
|
|
|
android:key="button_double_press_action_selection"
|
|
|
|
android:summary="%s"
|
|
|
|
android:defaultValue="@string/pref_button_action_disabled_value"
|
2020-01-08 20:01:13 +01:00
|
|
|
android:title="@string/prefs_button_double_press_action_selection_title" />
|
2019-11-14 12:33:36 +01:00
|
|
|
|
2020-01-08 19:58:31 +01:00
|
|
|
<ListPreference
|
2019-11-14 12:33:36 +01:00
|
|
|
android:dependency="button_action_enable"
|
2020-01-08 19:58:31 +01:00
|
|
|
android:entries="@array/button_action_options"
|
|
|
|
android:entryValues="@array/button_action_values"
|
|
|
|
android:key="button_triple_press_action_selection"
|
|
|
|
android:summary="%s"
|
|
|
|
android:defaultValue="@string/pref_button_action_disabled_value"
|
2020-01-08 20:01:13 +01:00
|
|
|
android:title="@string/prefs_button_triple_press_action_selection_title" />
|
2020-01-08 19:58:31 +01:00
|
|
|
|
2020-01-08 20:01:13 +01:00
|
|
|
<PreferenceCategory android:title="@string/prefs_button_variable_actions">
|
2020-01-08 19:58:31 +01:00
|
|
|
|
|
|
|
<EditTextPreference
|
|
|
|
android:defaultValue="6"
|
|
|
|
android:dependency="button_action_enable"
|
|
|
|
android:inputType="number"
|
|
|
|
android:key="button_action_press_count"
|
|
|
|
android:summary="@string/mi2_prefs_button_press_count_summary"
|
|
|
|
android:title="@string/mi2_prefs_button_press_count" />
|
|
|
|
|
|
|
|
<EditTextPreference
|
|
|
|
android:defaultValue="@string/mi2_prefs_button_press_broadcast_default_value"
|
|
|
|
android:dependency="button_action_enable"
|
|
|
|
android:key="button_action_broadcast"
|
|
|
|
android:summary="@string/mi2_prefs_button_press_broadcast_summary"
|
|
|
|
android:title="@string/mi2_prefs_button_press_broadcast" />
|
|
|
|
|
|
|
|
<EditTextPreference
|
|
|
|
android:defaultValue="2000"
|
|
|
|
android:dependency="button_action_enable"
|
|
|
|
android:inputType="number"
|
|
|
|
android:key="button_action_press_max_interval"
|
|
|
|
android:summary="@string/mi2_prefs_button_press_count_max_delay_summary"
|
|
|
|
android:title="@string/mi2_prefs_button_press_count_max_delay" />
|
|
|
|
|
|
|
|
</PreferenceCategory>
|
2019-11-14 12:33:36 +01:00
|
|
|
|
|
|
|
</PreferenceScreen>
|
|
|
|
</androidx.preference.PreferenceScreen>
|