summaryrefslogtreecommitdiff
path: root/core/src/main/res
diff options
context:
space:
mode:
authorPetar Kukolj <petarkukolj3@yahoo.com>2018-11-14 16:18:58 +0100
committerPetar Kukolj <petarkukolj3@yahoo.com>2018-11-14 16:40:59 +0100
commitb3fbb0ec7574cf1090bfb410589753ba8ef51bbb (patch)
tree740faa9df0b769deca7e4d7f3c78c43657413a62 /core/src/main/res
parent68b245701e2ff11f23d2bdf1145e8189dc3709ac (diff)
downloadAntennaPod-b3fbb0ec7574cf1090bfb410589753ba8ef51bbb.zip
Add configurable behavior of the back button
This PR allows users to change how the back button functions. Closes #2196 Possible choices are following: - **Default** - back button functions how it currently functions (closes the app if there is nowhere to go back to) - **Open navigation drawer** - back button always opens the navigation drawer instead of closing the app - **Double tap to exit** - like default, but requires two taps to close the app - **Confirm to exit** - like default, but prompts user if they really want to exit
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/strings.xml9
2 files changed, 23 insertions, 0 deletions
diff --git a/core/src/main/res/values/arrays.xml b/core/src/main/res/values/arrays.xml
index 7e2fed054..2d84cbd70 100644
--- a/core/src/main/res/values/arrays.xml
+++ b/core/src/main/res/values/arrays.xml
@@ -277,4 +277,18 @@
<item>@string/select_all_above</item>
<item>@string/select_all_below</item>
</string-array>
+
+ <string-array name="back_button_behavior_options">
+ <item>@string/back_button_default</item>
+ <item>@string/back_button_open_drawer</item>
+ <item>@string/back_button_double_tap</item>
+ <item>@string/back_button_show_prompt</item>
+ </string-array>
+
+ <string-array name="back_button_behavior_values">
+ <item>default</item>
+ <item>drawer</item>
+ <item>doubletap</item>
+ <item>prompt</item>
+ </string-array>
</resources>
diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml
index ad91ecc76..fd5535462 100644
--- a/core/src/main/res/values/strings.xml
+++ b/core/src/main/res/values/strings.xml
@@ -470,6 +470,15 @@
<string name="pref_videoBehavior_sum">Behavior when leaving video playback</string>
<string name="stop_playback">Stop playback</string>
<string name="continue_playback">Continue audio playback</string>
+ <string name="behavior">Behavior</string>
+ <string name="pref_back_button_behavior_title">Back button behavior</string>
+ <string name="pref_back_button_behavior_sum">Change behavior of the back button.</string>
+ <string name="back_button_default">Default</string>
+ <string name="back_button_open_drawer">Open navigation drawer</string>
+ <string name="back_button_double_tap">Double tap to exit</string>
+ <string name="back_button_show_prompt">Confirm to exit</string>
+ <string name="close_prompt">Are you sure you want to close AntennaPod?</string>
+ <string name="double_tap_toast">Tap back button again to exit</string>
<!-- Auto-Flattr dialog -->
<string name="auto_flattr_enable">Enable automatic flattring</string>