From 8ad9ef6c196f2fa5b01aa68edc7624e8628c482d Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 10 Apr 2018 23:33:04 +0200 Subject: [PATCH] Added categories --- .../activity/PreferenceActivity.java | 4 +- .../preferences/PreferenceController.java | 6 +- app/src/main/res/xml/preferences.xml | 4 +- .../main/res/xml/preferences_downloads.xml | 126 ++++++------- .../res/xml/preferences_miscellaneous.xml | 20 ++ app/src/main/res/xml/preferences_playback.xml | 177 +++++++++--------- app/src/main/res/xml/preferences_services.xml | 50 ++--- app/src/main/res/xml/preferences_storage.xml | 32 +++- .../res/xml/preferences_user_interface.xml | 93 ++++----- app/src/main/res/xml/preferences_various.xml | 22 --- core/src/main/res/values/strings.xml | 11 +- 11 files changed, 285 insertions(+), 260 deletions(-) create mode 100644 app/src/main/res/xml/preferences_miscellaneous.xml delete mode 100644 app/src/main/res/xml/preferences_various.xml diff --git a/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java index 07991ae74..b2e5c8f08 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/PreferenceActivity.java @@ -143,8 +143,8 @@ public class PreferenceActivity extends AppCompatActivity { return R.string.user_interface_label; case R.xml.preferences_services: return R.string.services_label; - case R.xml.preferences_various: - return R.string.various_pref; + case R.xml.preferences_miscellaneous: + return R.string.miscellaneous_pref; default: return R.string.settings_label; } diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java index 5bba09dbe..9ec5eeb8e 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -79,7 +79,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc private static final String PREF_SCREEN_DOWNLOADS = "prefScreenDownloads"; private static final String PREF_SCREEN_SERVICES = "prefScreenServices"; private static final String PREF_SCREEN_STORAGE = "prefScreenStorage"; - private static final String PREF_SCREEN_VARIOUS = "prefScreenVarious"; + private static final String PREF_SCREEN_MISCELLANEOUS = "prefScreenMiscellaneous"; private static final String PREF_FLATTR_SETTINGS = "prefFlattrSettings"; private static final String PREF_FLATTR_AUTH = "pref_flattr_authenticate"; @@ -155,8 +155,8 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc openScreen(R.xml.preferences_services, activity)); ui.findPreference(PREF_SCREEN_STORAGE).setOnPreferenceClickListener(preference -> openScreen(R.xml.preferences_storage, activity)); - ui.findPreference(PREF_SCREEN_VARIOUS).setOnPreferenceClickListener(preference -> - openScreen(R.xml.preferences_various, activity)); + ui.findPreference(PREF_SCREEN_MISCELLANEOUS).setOnPreferenceClickListener(preference -> + openScreen(R.xml.preferences_miscellaneous, activity)); } /* if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index a7383218d..1ab4e5ba3 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -28,8 +28,8 @@ android:icon="@drawable/ic_filter_grey600_24dp" /> diff --git a/app/src/main/res/xml/preferences_downloads.xml b/app/src/main/res/xml/preferences_downloads.xml index a37114c17..ad1e753cc 100644 --- a/app/src/main/res/xml/preferences_downloads.xml +++ b/app/src/main/res/xml/preferences_downloads.xml @@ -1,77 +1,75 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> - + + android:key="prefAutoUpdateIntervall" + android:summary="@string/pref_autoUpdateIntervallOrTime_sum" + android:title="@string/pref_autoUpdateIntervallOrTime_title"/> - + android:defaultValue="false" + android:enabled="true" + android:key="prefMobileUpdate" + android:summary="@string/pref_mobileUpdate_sum" + android:title="@string/pref_mobileUpdate_title"/> - - - + + android:key="prefEnableAutoDl" + android:title="@string/pref_automatic_download_title" + android:defaultValue="false"/> + + + android:key="prefEnableAutoDownloadOnBattery" + android:title="@string/pref_automatic_download_on_battery_title" + android:summary="@string/pref_automatic_download_on_battery_sum" + android:defaultValue="true"/> + android:key="prefEnableAutoDownloadOnMobile" + android:title="@string/pref_autodl_allow_on_mobile_title" + android:summary="@string/pref_autodl_allow_on_mobile_sum" + android:defaultValue="false"/> + - - + + + + + diff --git a/app/src/main/res/xml/preferences_miscellaneous.xml b/app/src/main/res/xml/preferences_miscellaneous.xml new file mode 100644 index 000000000..ad7cb9192 --- /dev/null +++ b/app/src/main/res/xml/preferences_miscellaneous.xml @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/app/src/main/res/xml/preferences_playback.xml b/app/src/main/res/xml/preferences_playback.xml index cf2af6e91..7fd92d344 100644 --- a/app/src/main/res/xml/preferences_playback.xml +++ b/app/src/main/res/xml/preferences_playback.xml @@ -1,110 +1,111 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + android:defaultValue="true" + android:enabled="true" + android:key="prefPauseOnHeadsetDisconnect" + android:summary="@string/pref_pauseOnDisconnect_sum" + android:title="@string/pref_pauseOnHeadsetDisconnect_title"/> + android:defaultValue="true" + android:enabled="true" + android:dependency="prefPauseOnHeadsetDisconnect" + android:key="prefUnpauseOnHeadsetReconnect" + android:summary="@string/pref_unpauseOnHeadsetReconnect_sum" + android:title="@string/pref_unpauseOnHeadsetReconnect_title"/> + android:defaultValue="false" + android:enabled="true" + android:dependency="prefPauseOnHeadsetDisconnect" + android:key="prefUnpauseOnBluetoothReconnect" + android:summary="@string/pref_unpauseOnBluetoothReconnect_sum" + android:title="@string/pref_unpauseOnBluetoothReconnect_title"/> + android:defaultValue="false" + android:enabled="true" + android:key="prefPauseForFocusLoss" + android:summary="@string/pref_pausePlaybackForFocusLoss_sum" + android:title="@string/pref_pausePlaybackForFocusLoss_title"/> + + + + + + + android:key="prefPlaybackFastForwardDeltaLauncher" + android:summary="@string/pref_fast_forward_sum" + android:title="@string/pref_fast_forward"/> + android:key="prefPlaybackRewindDeltaLauncher" + android:summary="@string/pref_rewind_sum" + android:title="@string/pref_rewind"/> + + + + + android:defaultValue="false" + android:enabled="true" + android:key="prefQueueAddToFront" + android:summary="@string/pref_queueAddToFront_sum" + android:title="@string/pref_queueAddToFront_title"/> + android:defaultValue="true" + android:enabled="true" + android:key="prefEnqueueDownloaded" + android:summary="@string/pref_enqueue_downloaded_summary" + android:title="@string/pref_enqueue_downloaded_title" /> - - + android:defaultValue="true" + android:enabled="true" + android:key="prefFollowQueue" + android:summary="@string/pref_followQueue_sum" + android:title="@string/pref_followQueue_title"/> - + android:defaultValue="30" + android:entries="@array/smart_mark_as_played_values" + android:entryValues="@array/smart_mark_as_played_values" + android:key="prefSmartMarkAsPlayedSecs" + android:summary="@string/pref_smart_mark_as_played_sum" + android:title="@string/pref_smart_mark_as_played_title" + app:useStockLayout="true"/> - + android:defaultValue="true" + android:enabled="true" + android:key="prefSkipKeepsEpisode" + android:summary="@string/pref_skip_keeps_episodes_sum" + android:title="@string/pref_skip_keeps_episodes_title"/> + + - - - - + diff --git a/app/src/main/res/xml/preferences_services.xml b/app/src/main/res/xml/preferences_services.xml index 157d33a71..8ce35b596 100644 --- a/app/src/main/res/xml/preferences_services.xml +++ b/app/src/main/res/xml/preferences_services.xml @@ -1,61 +1,63 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> - - + - - + + - - + - + + + - - - - - + + - - - - - - + diff --git a/app/src/main/res/xml/preferences_storage.xml b/app/src/main/res/xml/preferences_storage.xml index fc97f12da..c1d7a69fc 100644 --- a/app/src/main/res/xml/preferences_storage.xml +++ b/app/src/main/res/xml/preferences_storage.xml @@ -1,28 +1,40 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> - - + + + android:key="prefOpmlExport" + android:title="@string/opml_export_label"/> + android:key="prefOpmlImport" + android:title="@string/opml_import_label"/> + android:key="prefHtmlExport" + android:title="@string/html_export_label"/> diff --git a/app/src/main/res/xml/preferences_user_interface.xml b/app/src/main/res/xml/preferences_user_interface.xml index 8b24e631c..7ffa1b00f 100644 --- a/app/src/main/res/xml/preferences_user_interface.xml +++ b/app/src/main/res/xml/preferences_user_interface.xml @@ -1,55 +1,60 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + + android:entryValues="@array/theme_values" + android:entries="@array/theme_options" + android:title="@string/pref_set_theme_title" + android:key="prefTheme" + android:summary="@string/pref_set_theme_sum" + android:defaultValue="0" + app:useStockLayout="true"/> + android:key="prefHiddenDrawerItems" + android:summary="@string/pref_nav_drawer_items_sum" + android:title="@string/pref_nav_drawer_items_title"/> + android:entryValues="@array/nav_drawer_feed_order_values" + android:entries="@array/nav_drawer_feed_order_options" + android:title="@string/pref_nav_drawer_feed_order_title" + android:key="prefDrawerFeedOrder" + android:summary="@string/pref_nav_drawer_feed_order_sum" + android:defaultValue="0" + app:useStockLayout="true"/> + android:entryValues="@array/nav_drawer_feed_counter_values" + android:entries="@array/nav_drawer_feed_counter_options" + android:title="@string/pref_nav_drawer_feed_counter_title" + android:key="prefDrawerFeedIndicator" + android:summary="@string/pref_nav_drawer_feed_counter_sum" + android:defaultValue="0" + app:useStockLayout="true"/> + + + android:defaultValue="false" + android:enabled="true" + android:key="prefExpandNotify" + android:summary="@string/pref_expandNotify_sum" + android:title="@string/pref_expandNotify_title"/> + android:defaultValue="true" + android:enabled="true" + android:key="prefPersistNotify" + android:summary="@string/pref_persistNotify_sum" + android:title="@string/pref_persistNotify_title"/> + android:key="prefCompactNotificationButtons" + android:summary="@string/pref_compact_notification_buttons_sum" + android:title="@string/pref_compact_notification_buttons_title"/> + android:defaultValue="true" + android:enabled="true" + android:key="prefLockscreenBackground" + android:summary="@string/pref_lockscreen_background_sum" + android:title="@string/pref_lockscreen_background_title"/> + diff --git a/app/src/main/res/xml/preferences_various.xml b/app/src/main/res/xml/preferences_various.xml deleted file mode 100644 index 243ccb855..000000000 --- a/app/src/main/res/xml/preferences_various.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index f7785964a..f2f29eb30 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -23,6 +23,7 @@ Cancel\nDownload Playback History gpodder.net + Synchronize with other devices gpodder.net Login %1$s free Episode cache full @@ -307,8 +308,16 @@ Queue Services Flattr - Various + Micropayment service + Miscellaneous + Data usage + Details Import/Export + Appearance + External elements + Interruptions + Buttons + Media player Episode Cleanup Episodes that aren\'t in the queue and aren\'t favorites should be eligible for removal if Auto Download needs space for new episodes Pause playback when headphones or bluetooth are disconnected