KeyHandler: Add customization options
Change-Id: I5f50f5d442342b2082bf47e11b1351e578fa0144
This commit is contained in:
18
KeyHandler/res/values/arrays.xml
Normal file
18
KeyHandler/res/values/arrays.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<string-array name="alert_slider_action_entries" translatable="false">
|
||||
<item>@string/alert_slider_mode_normal</item>
|
||||
<item>@string/alert_slider_mode_vibration</item>
|
||||
<item>@string/alert_slider_mode_silent</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="alert_slider_action_entry_values" translatable="false">
|
||||
<item>2</item>
|
||||
<item>1</item>
|
||||
<item>0</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
16
KeyHandler/res/values/strings.xml
Normal file
16
KeyHandler/res/values/strings.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<!-- Alert slider -->
|
||||
<string name="alert_slider_category_title">Alert slider</string>
|
||||
<string name="alert_slider_selection_dialog_title">Action</string>
|
||||
<string name="alert_slider_top_position">Top position</string>
|
||||
<string name="alert_slider_middle_position">Middle position</string>
|
||||
<string name="alert_slider_bottom_position">Bottom position</string>
|
||||
<string name="alert_slider_mode_silent">Silent</string>
|
||||
<string name="alert_slider_mode_normal">Normal</string>
|
||||
<string name="alert_slider_mode_vibration">Vibration</string>
|
||||
</resources>
|
||||
38
KeyHandler/res/xml/button_panel.xml
Normal file
38
KeyHandler/res/xml/button_panel.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2021 The LineageOS Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory
|
||||
android:title="@string/alert_slider_category_title">
|
||||
|
||||
<ListPreference
|
||||
android:key="config_top_position"
|
||||
android:dialogTitle="@string/alert_slider_selection_dialog_title"
|
||||
android:title="@string/alert_slider_top_position"
|
||||
android:summary="%s"
|
||||
android:entries="@array/alert_slider_action_entries"
|
||||
android:entryValues="@array/alert_slider_action_entry_values"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<ListPreference
|
||||
android:key="config_middle_position"
|
||||
android:dialogTitle="@string/alert_slider_selection_dialog_title"
|
||||
android:title="@string/alert_slider_middle_position"
|
||||
android:summary="%s"
|
||||
android:entries="@array/alert_slider_action_entries"
|
||||
android:entryValues="@array/alert_slider_action_entry_values"
|
||||
android:defaultValue="1" />
|
||||
|
||||
<ListPreference
|
||||
android:key="config_bottom_position"
|
||||
android:dialogTitle="@string/alert_slider_selection_dialog_title"
|
||||
android:title="@string/alert_slider_bottom_position"
|
||||
android:summary="%s"
|
||||
android:entries="@array/alert_slider_action_entries"
|
||||
android:entryValues="@array/alert_slider_action_entry_values"
|
||||
android:defaultValue="2" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user