Cherish:HW Keys customization support [1/2]
Based on DUI jhenrique09 edits: make it DUI independent Original commit message: Same robust action library as used on software navigation. Supports single tap, double tap, and long press. As a precautionary measure, single tap back and single tap home are fixed and can not be changed. Camera button actions are not supported at this time. We will bring in wake key support at a later time. Also includes: DUI: Initial checkin for Oreo [4/7] Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -31,10 +31,19 @@
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
<Preference
|
||||
android:key="volume_key"
|
||||
android:fragment="com.cherish.settings.fragments.VolumeRockerSettings"
|
||||
android:title="@string/volume_title" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="hardware_keys"
|
||||
android:title="@string/hardware_keys_category" >
|
||||
|
||||
<SwitchPreference
|
||||
android:key="hardware_keys_disable"
|
||||
android:title="@string/hardware_keys_disable_title" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="button_brightness"
|
||||
android:title="@string/button_brightness_title"
|
||||
@@ -56,21 +65,137 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/backlight_timeout_title" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="button_backlight_only_when_pressed"
|
||||
android:title="@string/button_backlight_on_touch_only_title"
|
||||
android:summary="@string/button_backlight_on_touch_only_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="volume_keys"
|
||||
android:title="@string/volume_keys_title">
|
||||
<PreferenceCategory
|
||||
android:key="back_key"
|
||||
android:title="@string/hardware_keys_back_key_title" >
|
||||
|
||||
<Preference
|
||||
android:key="volume_key"
|
||||
android:fragment="com.cherish.settings.fragments.VolumeRockerSettings"
|
||||
android:title="@string/volume_title" />
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_back_single_tap"
|
||||
android:summary="@string/hardware_keys_single_tap_summary"
|
||||
android:title="@string/hardware_keys_single_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="allow_incall_home"
|
||||
android:title="@string/allow_incall_home_title"
|
||||
android:summary="@string/allow_incall_home_summary"
|
||||
android:defaultValue="true" />
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_back_long_press"
|
||||
android:summary="@string/hardware_keys_long_press_summary"
|
||||
android:title="@string/hardware_keys_long_press_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_back_double_tap"
|
||||
android:summary="@string/hardware_keys_double_tap_summary"
|
||||
android:title="@string/hardware_keys_double_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="home_key"
|
||||
android:title="@string/hardware_keys_home_key_title" >
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_home_single_tap"
|
||||
android:summary="@string/hardware_keys_single_tap_summary"
|
||||
android:title="@string/hardware_keys_single_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_home_long_press"
|
||||
android:summary="@string/hardware_keys_long_press_summary"
|
||||
android:title="@string/hardware_keys_long_press_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_home_double_tap"
|
||||
android:summary="@string/hardware_keys_double_tap_summary"
|
||||
android:title="@string/hardware_keys_double_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="allow_incall_home"
|
||||
android:title="@string/allow_incall_home_title"
|
||||
android:summary="@string/allow_incall_home_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="app_switch_key"
|
||||
android:title="@string/hardware_keys_appswitch_key_title" >
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_overview_single_tap"
|
||||
android:summary="@string/hardware_keys_single_tap_summary"
|
||||
android:title="@string/hardware_keys_single_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_overview_long_press"
|
||||
android:summary="@string/hardware_keys_long_press_summary"
|
||||
android:title="@string/hardware_keys_long_press_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_overview_double_tap"
|
||||
android:summary="@string/hardware_keys_double_tap_summary"
|
||||
android:title="@string/hardware_keys_double_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="menu_key"
|
||||
android:title="@string/hardware_keys_menu_key_title" >
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_menu_single_tap"
|
||||
android:summary="@string/hardware_keys_single_tap_summary"
|
||||
android:title="@string/hardware_keys_single_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_menu_long_press"
|
||||
android:summary="@string/hardware_keys_long_press_summary"
|
||||
android:title="@string/hardware_keys_long_press_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_menu_double_tap"
|
||||
android:summary="@string/hardware_keys_double_tap_summary"
|
||||
android:title="@string/hardware_keys_double_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="assist_key"
|
||||
android:title="@string/hardware_keys_assist_key_title" >
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_assist_single_tap"
|
||||
android:summary="@string/hardware_keys_single_tap_summary"
|
||||
android:title="@string/hardware_keys_single_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_assist_long_press"
|
||||
android:summary="@string/hardware_keys_long_press_summary"
|
||||
android:title="@string/hardware_keys_long_press_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
<com.cherish.settings.preferences.ActionPreference
|
||||
android:key="hwkeys_button_assist_double_tap"
|
||||
android:summary="@string/hardware_keys_double_tap_summary"
|
||||
android:title="@string/hardware_keys_double_tap_title" >
|
||||
</com.cherish.settings.preferences.ActionPreference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user