New settings (#891)
* change drawer items * rename SettingsActivity * introduce AccountSettings activity * improve account settings, move notification settings * sync settings with server * rename settings back to preferences * add functionality for settings * move mediaPreviewEnabled preference to AccountPreferences * replace shared prefs with accountmanager * move PreferencesFragment to support library * split preferences fragment into smaller fragments, merge AccountPreferencesActivity into PreferencesFragment * adjust icon size, add icons to general preferences * change mediaPreviewEnabled and alwaysShowSensitiveMedia pref position * add database migration * remove pullNotificationCheckInterval option * fix preference in TimelineFragment * Update Chinese translations. (#915) * Update zh-CN translations. * Update zh-SG translations. * Update zh-TW translations. * Update zh-MO translations. * Update zh-HK translations. * Fix errors in zh-CN translations. * Fix errors in zh-SG translations. * Fix errors in zh-TW translations. * Fix errors in zh-MO translations. * Fix errors in zh-HK translations.
This commit is contained in:
parent
690e612f8b
commit
348c20c792
65 changed files with 1636 additions and 1083 deletions
47
app/src/main/res/xml/account_preferences.xml
Normal file
47
app/src/main/res/xml/account_preferences.xml
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="@string/preferences_file_key">
|
||||
|
||||
<Preference
|
||||
android:key="notificationPreference"
|
||||
android:title="@string/pref_title_edit_notification_settings" />
|
||||
|
||||
<Preference
|
||||
android:key="mutedUsersPreference"
|
||||
android:title="@string/action_view_mutes" />
|
||||
|
||||
<Preference
|
||||
android:key="blockedUsersPreference"
|
||||
android:title="@string/action_view_blocks" />
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_publishing">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="public"
|
||||
android:entries="@array/post_privacy_names"
|
||||
android:entryValues="@array/post_privacy_values"
|
||||
android:key="defaultPostPrivacy"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_default_post_privacy" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:icon="@drawable/ic_eye_24dp"
|
||||
android:key="defaultMediaSensitivity"
|
||||
android:title="Always mark media as sensitive" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_timelines">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="mediaPreviewEnabled"
|
||||
android:title="@string/pref_title_show_media_preview" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="alwaysShowSensitiveMedia"
|
||||
android:title="@string/pref_title_alway_show_sensitive_media" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
|
@ -1,18 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen android:title="@string/pref_title_http_proxy_settings"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/pref_title_http_proxy_settings">
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="httpProxyEnabled"
|
||||
android:title="@string/pref_title_http_proxy_enable" />
|
||||
android:title="@string/pref_title_http_proxy_enable"
|
||||
app:iconSpaceReserved="false" />
|
||||
<EditTextPreference
|
||||
android:key="httpProxyServer"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_title_http_proxy_server"
|
||||
android:summary="%s" />
|
||||
app:iconSpaceReserved="false" />
|
||||
<EditTextPreference
|
||||
android:key="httpProxyPort"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_title_http_proxy_port"
|
||||
android:summary="%s" />
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceScreen>
|
|
@ -1,57 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen android:key="notificationSettings"
|
||||
android:title="@string/pref_title_edit_notification_settings"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="notificationSettings"
|
||||
android:title="@string/pref_title_edit_notification_settings">
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationsEnabled"
|
||||
android:title="@string/pref_title_notifications_enabled" />
|
||||
android:title="@string/pref_title_notifications_enabled"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:dependency="notificationsEnabled"
|
||||
android:title="@string/pref_title_notification_filters">
|
||||
android:title="@string/pref_title_notification_filters"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationFilterMentions"
|
||||
android:title="@string/pref_title_notification_filter_mentions" />
|
||||
android:title="@string/pref_title_notification_filter_mentions"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationFilterFollows"
|
||||
android:title="@string/pref_title_notification_filter_follows" />
|
||||
android:title="@string/pref_title_notification_filter_follows"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationFilterReblogs"
|
||||
android:title="@string/pref_title_notification_filter_reblogs" />
|
||||
android:title="@string/pref_title_notification_filter_reblogs"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationFilterFavourites"
|
||||
android:title="@string/pref_title_notification_filter_favourites" />
|
||||
android:title="@string/pref_title_notification_filter_favourites"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:dependency="notificationsEnabled"
|
||||
android:title="@string/pref_title_notification_alerts">
|
||||
android:title="@string/pref_title_notification_alerts"
|
||||
app:iconSpaceReserved="false">
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationAlertSound"
|
||||
android:title="@string/pref_title_notification_alert_sound" />
|
||||
android:title="@string/pref_title_notification_alert_sound"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationAlertVibrate"
|
||||
android:title="@string/pref_title_notification_alert_vibrate" />
|
||||
android:title="@string/pref_title_notification_alert_vibrate"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="notificationAlertLight"
|
||||
android:title="@string/pref_title_notification_alert_light" />
|
||||
android:title="@string/pref_title_notification_alert_light"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?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"
|
||||
android:key="@string/preferences_file_key">
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_appearance_settings">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_title_appearance_settings">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="night"
|
||||
|
@ -16,7 +18,8 @@
|
|||
android:defaultValue="@string/system_default"
|
||||
android:key="emojiCompat"
|
||||
android:summary="@string/system_default"
|
||||
android:title="@string/emoji_style"/>
|
||||
android:icon="@drawable/ic_emoji_24dp"
|
||||
android:title="@string/emoji_style" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="medium"
|
||||
|
@ -31,64 +34,31 @@
|
|||
android:key="fabHide"
|
||||
android:title="@string/pref_title_hide_follow_button" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="mediaPreviewEnabled"
|
||||
android:title="@string/pref_title_show_media_preview" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="mediaPreviewEnabled"
|
||||
android:key="alwaysShowSensitiveMedia"
|
||||
android:title="@string/pref_title_alway_show_sensitive_media" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="absoluteTimeView"
|
||||
android:title="@string/pref_title_absolute_time" />
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_publishing">
|
||||
<ListPreference
|
||||
android:defaultValue="public"
|
||||
android:entries="@array/post_privacy_names"
|
||||
android:entryValues="@array/post_privacy_values"
|
||||
android:key="defaultPostPrivacy"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_default_post_privacy" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_browser_settings">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_title_browser_settings">
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="customTabs"
|
||||
android:title="@string/pref_title_custom_tabs" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_status_filter">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_title_status_filter">
|
||||
<Preference
|
||||
android:key="timelineFilterPreferences"
|
||||
android:title="@string/pref_title_status_tabs" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_notification_settings">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="15"
|
||||
android:entries="@array/pull_notification_check_interval_names"
|
||||
android:entryValues="@array/pull_notification_check_intervals"
|
||||
android:key="pullNotificationCheckInterval"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_title_pull_notification_check_interval" />
|
||||
|
||||
<Preference
|
||||
android:key="notificationPreferences"
|
||||
android:title="@string/pref_title_edit_notification_settings" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_title_proxy_settings">
|
||||
<PreferenceCategory
|
||||
android:title="@string/pref_title_proxy_settings">
|
||||
<Preference
|
||||
android:key="httpProxyPreferences"
|
||||
android:summary="%s"
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen android:title="@string/pref_title_status_tabs"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/pref_title_status_tabs">
|
||||
|
||||
<PreferenceCategory android:title="@string/title_home">
|
||||
<PreferenceCategory
|
||||
android:title="@string/title_home"
|
||||
app:iconSpaceReserved="false">
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="tabFilterHomeBoosts"
|
||||
android:title="@string/pref_title_show_boosts" />
|
||||
android:title="@string/pref_title_show_boosts"
|
||||
app:iconSpaceReserved="false" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:key="tabFilterHomeReplies"
|
||||
android:title="@string/pref_title_show_replies" />
|
||||
android:title="@string/pref_title_show_replies"
|
||||
app:iconSpaceReserved="false" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/title_advanced">
|
||||
<EditTextPreference
|
||||
android:key="tabFilterRegex"
|
||||
<PreferenceCategory
|
||||
android:title="@string/title_advanced"
|
||||
app:iconSpaceReserved="false">
|
||||
<Preference
|
||||
android:inputType="textNoSuggestions"
|
||||
android:title="@string/pref_title_filter_regex" />
|
||||
android:key="tabFilterRegex"
|
||||
android:title="@string/pref_title_filter_regex"
|
||||
app:iconSpaceReserved="false" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
Loading…
Add table
Add a link
Reference in a new issue