mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Add an option to change time format. Properly show message time in ViewPrivateMessagesActivity.
This commit is contained in:
@@ -168,4 +168,54 @@
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="settings_time_format">
|
||||
<item>Jan 2, 2020, 01:00</item>
|
||||
<item>Jan 2, 2020, 01:00 PM</item>
|
||||
<item>2 Jan, 2020, 01:00</item>
|
||||
<item>2 Jan, 2020, 01:00 PM</item>
|
||||
<item>1/2/2020 01:00 (Month first)</item>
|
||||
<item>1/2/2020 01:00 PM (Month first)</item>
|
||||
<item>2/1/2020 01:00 (Day first)</item>
|
||||
<item>2/1/2020 01:00 PM (Day first)</item>
|
||||
<item>2020/1/2 01:00 (Month first)</item>
|
||||
<item>2020/1/2 01:00 PM (Month first)</item>
|
||||
<item>1-2-2020 01:00 (Month first)</item>
|
||||
<item>1-2-2020 01:00 PM (Month first)</item>
|
||||
<item>2-1-2020 01:00 (Day first)</item>
|
||||
<item>2-1-2020 01:00 PM (Day first)</item>
|
||||
<item>2020-1-2 01:00 (Month first)</item>
|
||||
<item>2020-1-2 01:00 PM (Month first)</item>
|
||||
<item>1.2.2020 01:00 (Month first)</item>
|
||||
<item>1.2.2020 01:00 PM (Month first)</item>
|
||||
<item>2.1.2020 01:00 (Day first)</item>
|
||||
<item>2.1.2020 01:00 PM (Day first)</item>
|
||||
<item>2020.1.2 01:00 (Month first)</item>
|
||||
<item>2020.1.2 01:00 PM (Month first)</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="settings_time_format_values">
|
||||
<item>MMM d, yyyy, HH:mm</item>
|
||||
<item>MMM d, yyyy, hh:mm a</item>
|
||||
<item>d MMM yyyy, HH:mm</item>
|
||||
<item>d MMM yyyy, hh:mm a</item>
|
||||
<item>M/d/yyyy HH:mm</item>
|
||||
<item>M/d/yyyy hh:mm a</item>
|
||||
<item>d/M/yyyy HH:mm</item>
|
||||
<item>d/M/yyyy hh:mm a</item>
|
||||
<item>yyyy/M/d HH:mm</item>
|
||||
<item>yyyy/M/d hh:mm a</item>
|
||||
<item>M-d-yyyy HH:mm</item>
|
||||
<item>M-d-yyyy hh:mm a</item>
|
||||
<item>d-M-yyyy HH:mm</item>
|
||||
<item>d-M-yyyy hh:mm a</item>
|
||||
<item>yyyy-M-d HH:mm</item>
|
||||
<item>yyyy-M-d hh:mm a</item>
|
||||
<item>M.d.yyyy HH:mm</item>
|
||||
<item>M.d.yyyy hh:mm a</item>
|
||||
<item>d.M.yyyy HH:mm</item>
|
||||
<item>d.M.yyyy hh:mm a</item>
|
||||
<item>yyyy.M.d HH:mm</item>
|
||||
<item>yyyy.M.d hh:mm a</item>
|
||||
</string-array>
|
||||
</resources>
|
@@ -355,6 +355,7 @@
|
||||
<string name="settings_comment_toolbar_hidden">Comment Toolbar Hidden by Default</string>
|
||||
<string name="settings_show_absolute_number_of_votes_title">Show Absolute Number of Votes</string>
|
||||
<string name="settings_show_elapsed_time">Show Elapsed Time in Posts and Comments</string>
|
||||
<string name="settings_time_format_title">Time Format</string>
|
||||
<string name="settings_default_post_layout">Default Post Layout</string>
|
||||
<string name="settings_show_divider_in_compact_layout">Show Divider in Compact Layout</string>
|
||||
<string name="settings_show_thumbnail_on_the_right_in_compact_layout">Show Thumbnail on the Right in Compact Layout</string>
|
||||
|
@@ -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"
|
||||
|
16
app/src/main/res/xml/time_format_preferences.xml
Normal file
16
app/src/main/res/xml/time_format_preferences.xml
Normal file
@@ -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>
|
Reference in New Issue
Block a user