summaryrefslogtreecommitdiff
path: root/core/src/main/res
diff options
context:
space:
mode:
authorTim Schumacher <tim@timakro.de>2021-02-03 12:50:01 +0100
committerGitHub <noreply@github.com>2021-02-03 12:50:01 +0100
commit1297a168507d691a29092c89f46000736a753a04 (patch)
tree13576e693ea67242d90c1c73abbd51c153e19243 /core/src/main/res
parent4ff6ff4fb73614de6498f9562bbbf392f69a6fae (diff)
downloadAntennaPod-1297a168507d691a29092c89f46000736a753a04.zip
Allow remapping hardware buttons (#4881)
Diffstat (limited to 'core/src/main/res')
-rw-r--r--core/src/main/res/values/arrays.xml14
-rw-r--r--core/src/main/res/values/keycodes.xml9
-rw-r--r--core/src/main/res/values/strings.xml13
3 files changed, 32 insertions, 4 deletions
diff --git a/core/src/main/res/values/arrays.xml b/core/src/main/res/values/arrays.xml
index 79ffb10ce..6492c1aa2 100644
--- a/core/src/main/res/values/arrays.xml
+++ b/core/src/main/res/values/arrays.xml
@@ -105,6 +105,20 @@
<item>@string/episode_cleanup_never</item>
</string-array>
+ <string-array name="button_action_options">
+ <item>@string/button_action_fast_forward</item>
+ <item>@string/button_action_rewind</item>
+ <item>@string/button_action_skip_episode</item>
+ <item>@string/button_action_restart_episode</item>
+ </string-array>
+
+ <string-array name="button_action_values">
+ <item>@string/keycode_media_fast_forward</item>
+ <item>@string/keycode_media_rewind</item>
+ <item>@string/keycode_media_next</item>
+ <item>@string/keycode_media_previous</item>
+ </string-array>
+
<string-array name="enqueue_location_options">
<item>@string/enqueue_location_back</item>
<item>@string/enqueue_location_front</item>
diff --git a/core/src/main/res/values/keycodes.xml b/core/src/main/res/values/keycodes.xml
new file mode 100644
index 000000000..e0d44ce04
--- /dev/null
+++ b/core/src/main/res/values/keycodes.xml
@@ -0,0 +1,9 @@
+<resources
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:ignore="MissingTranslation">
+
+ <string name="keycode_media_next">87</string>
+ <string name="keycode_media_previous">88</string>
+ <string name="keycode_media_rewind">89</string>
+ <string name="keycode_media_fast_forward">90</string>
+</resources>
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index 403f021f7..0cd8bcd54 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -381,6 +381,7 @@
<string name="external_elements">External elements</string>
<string name="interruptions">Interruptions</string>
<string name="playback_control">Playback control</string>
+ <string name="reassign_hardware_buttons">Reassign hardware buttons</string>
<string name="preference_search_hint">Search…</string>
<string name="preference_search_no_results">No results</string>
<string name="preference_search_clear_history">Clear history</string>
@@ -390,10 +391,14 @@
<string name="pref_pauseOnDisconnect_sum">Pause playback when headphones or bluetooth are disconnected</string>
<string name="pref_unpauseOnHeadsetReconnect_sum">Resume playback when the headphones are reconnected</string>
<string name="pref_unpauseOnBluetoothReconnect_sum">Resume playback when bluetooth reconnects</string>
- <string name="pref_hardwareForwardButtonSkips_title">Forward Button Skips</string>
- <string name="pref_hardwareForwardButtonSkips_sum">When pressing a forward button on a bluetooth-connected device skip to the next episode instead of fast-forwarding</string>
- <string name="pref_hardwarePreviousButtonRestarts_title">Previous button restarts</string>
- <string name="pref_hardwarePreviousButtonRestarts_sum">When pressing a hardware previous button restart playing the current episode instead of rewinding</string>
+ <string name="pref_hardware_forward_button_title">Forward Button</string>
+ <string name="pref_hardware_forward_button_summary">Customize the forward button behavior</string>
+ <string name="pref_hardware_previous_button_title">Previous Button</string>
+ <string name="pref_hardware_previous_button_summary">Customize the previous button behavior</string>
+ <string name="button_action_fast_forward">Fast Forward</string>
+ <string name="button_action_rewind">Rewind</string>
+ <string name="button_action_skip_episode">Skip Episode</string>
+ <string name="button_action_restart_episode">Restart Episode</string>
<string name="pref_followQueue_sum">Jump to next queue item when playback completes</string>
<string name="pref_auto_delete_sum">Delete episode when playback completes</string>
<string name="pref_auto_delete_title">Auto Delete</string>