aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/xml
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-07-02 10:59:53 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-07-02 10:59:53 +0000
commit9a4edde8fb5550b5caa66eeaba4e686a6b1ff442 (patch)
tree2fa363d68d03164031aa40dbe41580a84a184b3f /app/src/main/res/xml
parent3a72c5a1f8f37010459794a4c6e80e0141030907 (diff)
downloadinfinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.tar
infinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.tar.gz
infinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.tar.bz2
infinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.tar.lz
infinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.tar.xz
infinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.tar.zst
infinity-for-reddit-9a4edde8fb5550b5caa66eeaba4e686a6b1ff442.zip
Add an option to change time format. Properly show message time in ViewPrivateMessagesActivity.
Diffstat (limited to 'app/src/main/res/xml')
-rw-r--r--app/src/main/res/xml/interface_preference.xml7
-rw-r--r--app/src/main/res/xml/time_format_preferences.xml16
2 files changed, 19 insertions, 4 deletions
diff --git a/app/src/main/res/xml/interface_preference.xml b/app/src/main/res/xml/interface_preference.xml
index d2525eb6..900ee84d 100644
--- a/app/src/main/res/xml/interface_preference.xml
+++ b/app/src/main/res/xml/interface_preference.xml
@@ -27,10 +27,9 @@
app:key="vote_buttons_on_the_right"
app:title="@string/settings_vote_buttons_on_the_right_title" />
- <SwitchPreference
- app:defaultValue="false"
- app:key="show_elapsed_time"
- app:title="@string/settings_show_elapsed_time" />
+ <Preference
+ app:title="@string/settings_time_format_title"
+ app:fragment="ml.docilealligator.infinityforreddit.Settings.TimeFormatPreferenceFragment" />
<ListPreference
app:defaultValue="0"
diff --git a/app/src/main/res/xml/time_format_preferences.xml b/app/src/main/res/xml/time_format_preferences.xml
new file mode 100644
index 00000000..a6080d32
--- /dev/null
+++ b/app/src/main/res/xml/time_format_preferences.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+ <SwitchPreference
+ app:defaultValue="false"
+ app:key="show_elapsed_time"
+ app:title="@string/settings_show_elapsed_time" />
+
+ <ListPreference
+ app:defaultValue="MMM d, yyyy, HH:mm"
+ app:entries="@array/settings_time_format"
+ app:entryValues="@array/settings_time_format_values"
+ app:key="time_format"
+ app:title="@string/settings_time_format_title"
+ app:useSimpleSummaryProvider="true" />
+</PreferenceScreen> \ No newline at end of file