Reorganize settings.

This commit is contained in:
Alex Ning 2020-07-19 13:16:14 +08:00
parent 783325cfe1
commit f37a46e2c2
3 changed files with 32 additions and 20 deletions

View File

@ -364,6 +364,7 @@
<string name="settings_customize_tabs_in_main_page_summary">Only for Logged-in User</string>
<string name="settings_enable_bottom_app_bar_title">Enable Bottom Navigation</string>
<string name="settings_enable_bottom_app_bar_summary">Has No Effect in Anonymous Mode</string>
<string name="settings_category_post_and_comment_title">Post and Comment</string>
<string name="settings_vote_buttons_on_the_right_title">Vote Buttons on the Right</string>
<string name="settings_volume_keys_navigate_comments_title">Use Volume Keys to Navigate Comments in Posts</string>
<string name="settings_volume_keys_navigate_posts_title">Use Volume Keys to Navigate Posts</string>
@ -373,6 +374,7 @@
<string name="settings_video_player_ignore_nav_bar_title">Ignore Navigation Bar in Video Player</string>
<string name="settings_video_player_ignore_nav_bar_summary">Prevent the Video Controller Having Extra Margin</string>
<string name="settings_confirm_to_exit">Confirm to Exit</string>
<string name="settings_category_comment_title">Comment</string>
<string name="settings_show_top_level_comments_first_title">Show Top-level Comments First</string>
<string name="settings_show_comment_divider_title">Show Comment Divider</string>
<string name="settings_comment_toolbar_hide_on_click">Click to Show/Hide Comment Toolbar</string>
@ -381,6 +383,7 @@
<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_category_post_title">Post</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_left_in_compact_layout">Show Thumbnail on the Left in Compact Layout</string>

View File

@ -24,14 +24,25 @@
app:title="@string/settings_enable_bottom_app_bar_title"
app:summary="@string/settings_enable_bottom_app_bar_summary" />
<PreferenceCategory
app:title="@string/settings_category_post_and_comment_title" />
<Preference
app:title="@string/settings_time_format_title"
app:fragment="ml.docilealligator.infinityforreddit.Settings.TimeFormatPreferenceFragment" />
<SwitchPreference
app:defaultValue="false"
app:key="vote_buttons_on_the_right"
app:title="@string/settings_vote_buttons_on_the_right_title" />
<Preference
app:title="@string/settings_time_format_title"
app:fragment="ml.docilealligator.infinityforreddit.Settings.TimeFormatPreferenceFragment" />
<SwitchPreference
app:defaultValue="true"
app:key="show_absolute_number_of_votes"
app:title="@string/settings_show_absolute_number_of_votes_title" />
<PreferenceCategory
app:title="@string/settings_category_post_title" />
<ListPreference
app:defaultValue="0"
@ -51,6 +62,9 @@
app:key="show_thumbnail_on_the_left_in_compact_layout"
app:title="@string/settings_show_thumbnail_on_the_left_in_compact_layout" />
<PreferenceCategory
app:title="@string/settings_category_comment_title" />
<SwitchPreference
app:defaultValue="false"
app:key="show_top_level_comments_first"
@ -76,9 +90,4 @@
app:key="fully_collapse_comment"
android:title="@string/settings_fully_collapse_comment_title" />
<SwitchPreference
app:defaultValue="true"
app:key="show_absolute_number_of_votes"
app:title="@string/settings_show_absolute_number_of_votes_title" />
</PreferenceScreen>

View File

@ -22,23 +22,11 @@
app:title="@string/settings_gestures_and_buttons_title"
app:fragment="ml.docilealligator.infinityforreddit.Settings.GesturesAndButtonsPreferenceFragment" />
<SwitchPreference
app:defaultValue="false"
app:icon="@drawable/ic_link"
app:key="open_link_in_app"
app:title="@string/settings_open_link_in_app_title" />
<Preference
app:title="@string/settigns_video_title"
android:icon="@drawable/ic_outline_video_24dp"
app:fragment="ml.docilealligator.infinityforreddit.Settings.VideoPreferenceFragment" />
<SwitchPreference
app:defaultValue="false"
app:key="confirm_to_exit"
app:icon="@drawable/ic_exit_24dp"
app:title="@string/settings_confirm_to_exit" />
<ListPreference
app:defaultValue="2.5"
android:entries="@array/settings_lazy_mode_interval"
@ -48,6 +36,18 @@
app:title="@string/settings_lazy_mode_interval_title"
app:useSimpleSummaryProvider="true" />
<SwitchPreference
app:defaultValue="false"
app:icon="@drawable/ic_link"
app:key="open_link_in_app"
app:title="@string/settings_open_link_in_app_title" />
<SwitchPreference
app:defaultValue="false"
app:key="confirm_to_exit"
app:icon="@drawable/ic_exit_24dp"
app:title="@string/settings_confirm_to_exit" />
<SwitchPreference
app:defaultValue="false"
app:key="nsfw"