Add categories to settings pages

This commit is contained in:
Cloudburst 2022-12-23 20:50:05 +01:00 committed by GitHub
parent b6b7cceea5
commit f3e7a5daa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 312 additions and 249 deletions

View file

@ -242,6 +242,7 @@
<string name="automatic_plugin_download_summary">Automatically install all not yet installed plugins from added repositories.</string> <string name="automatic_plugin_download_summary">Automatically install all not yet installed plugins from added repositories.</string>
<string name="updates_settings">Show app updates</string> <string name="updates_settings">Show app updates</string>
<string name="updates_settings_des">Automatically search for new updates on start</string> <string name="updates_settings_des">Automatically search for new updates on start</string>
<string name="redo_setup_process">Redo setup process</string>
<string name="uprereleases_settings">Update to prereleases</string> <string name="uprereleases_settings">Update to prereleases</string>
<string name="uprereleases_settings_des">Search for prerelease updates instead of full releases only</string> <string name="uprereleases_settings_des">Search for prerelease updates instead of full releases only</string>
<string name="apk_installer_settings">APK Installer</string> <string name="apk_installer_settings">APK Installer</string>
@ -389,6 +390,19 @@
responsibility of user to avoid any actions that might violate the laws governing his/her locality. Use responsibility of user to avoid any actions that might violate the laws governing his/her locality. Use
CloudStream 3 at your own risk. CloudStream 3 at your own risk.
</string> </string>
<string name="pref_category_links">Links</string>
<string name="pref_category_app_updates">App updates</string>
<string name="pref_category_backup">Backup</string>
<string name="pref_category_extensions">Extensions</string>
<string name="pref_category_actions">Actions</string>
<string name="pref_category_cache">Cache</string>
<string name="pref_category_gestures">Gestures</string>
<string name="pref_category_player_features">Player features</string>
<string name="pref_category_subtitles">Subtitles</string>
<string name="pref_category_player_layout">Layout</string>
<string name="pref_category_defaults">Defaults</string>
<string name="pref_category_looks">Looks</string>
<string name="pref_category_ui_features">Features</string>
<string name="category_general">General</string> <string name="category_general">General</string>
<string name="random_button_settings">Random Button</string> <string name="random_button_settings">Random Button</string>
<string name="random_button_settings_desc">Show random button on Homepage</string> <string name="random_button_settings_desc">Show random button on Homepage</string>

View file

@ -158,7 +158,7 @@
<item name="colorAccent">@color/material_dynamic_primary80</item> <item name="colorAccent">@color/material_dynamic_primary80</item>
<item name="colorOnPrimary">@color/material_dynamic_primary20</item> <item name="colorOnPrimary">@color/material_dynamic_primary20</item>
<!-- Needed for leanback fuckery --> <!-- Needed for leanback fuckery -->
<item name="android:colorAccent">@color/material_dynamic_primary30</item> <item name="android:colorAccent">@color/material_dynamic_primary80</item>
</style> </style>
<style name="OverlayPrimaryColorMonetTwo"> <style name="OverlayPrimaryColorMonetTwo">
@ -168,7 +168,7 @@
<item name="colorAccent">@color/material_dynamic_secondary80</item> <item name="colorAccent">@color/material_dynamic_secondary80</item>
<item name="colorOnPrimary">@color/material_dynamic_secondary20</item> <item name="colorOnPrimary">@color/material_dynamic_secondary20</item>
<!-- Needed for leanback fuckery --> <!-- Needed for leanback fuckery -->
<item name="android:colorAccent">@color/material_dynamic_secondary30</item> <item name="android:colorAccent">@color/material_dynamic_secondary80</item>
</style> </style>
<style name="OverlayPrimaryColorBlue"> <style name="OverlayPrimaryColorBlue">

View file

@ -1,6 +1,42 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen 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"> xmlns:app="http://schemas.android.com/apk/res-auto">
<SwitchPreference
android:icon="@drawable/baseline_sync_24"
android:summary="@string/episode_sync_settings_des"
android:title="@string/episode_sync_settings"
app:defaultValue="true"
app:key="@string/episode_sync_enabled_key" />
<PreferenceCategory
android:title="@string/pref_category_defaults">
<Preference
android:icon="@drawable/ic_baseline_hd_24"
android:key="@string/quality_pref_key"
android:title="@string/watch_quality_pref" />
<Preference
android:icon="@drawable/netflix_play"
android:key="@string/player_pref_key"
android:title="@string/player_pref" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_player_layout">
<Preference
android:icon="@drawable/ic_baseline_text_format_24"
android:key="@string/prefer_limit_title_key"
android:title="@string/limit_title" />
<Preference
android:icon="@drawable/ic_baseline_text_format_24"
android:key="@string/prefer_limit_title_rez_key"
android:title="@string/limit_title_rez" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_subtitles">
<Preference <Preference
android:icon="@drawable/ic_outline_subtitles_24" android:icon="@drawable/ic_outline_subtitles_24"
android:key="@string/subtitle_settings_key" android:key="@string/subtitle_settings_key"
@ -11,28 +47,11 @@
android:key="@string/subtitle_settings_chromecast_key" android:key="@string/subtitle_settings_chromecast_key"
android:title="@string/chromecast_subtitles_settings" android:title="@string/chromecast_subtitles_settings"
app:summary="@string/chromecast_subtitles_settings_des" /> app:summary="@string/chromecast_subtitles_settings_des" />
</PreferenceCategory>
<Preference <PreferenceCategory
android:icon="@drawable/ic_baseline_hd_24" android:title="@string/pref_category_player_features">
android:key="@string/quality_pref_key"
android:title="@string/watch_quality_pref" />
<Preference
android:icon="@drawable/netflix_play"
android:key="@string/player_pref_key"
android:title="@string/player_pref" />
<Preference
android:icon="@drawable/ic_baseline_text_format_24"
android:key="@string/prefer_limit_title_key"
android:title="@string/limit_title" />
<Preference
android:icon="@drawable/ic_baseline_text_format_24"
android:key="@string/prefer_limit_title_rez_key"
android:title="@string/limit_title_rez" />
<SwitchPreference <SwitchPreference
android:icon="@drawable/ic_baseline_picture_in_picture_alt_24" android:icon="@drawable/ic_baseline_picture_in_picture_alt_24"
android:summary="@string/picture_in_picture_des" android:summary="@string/picture_in_picture_des"
@ -51,18 +70,6 @@
android:title="@string/eigengraumode_settings" android:title="@string/eigengraumode_settings"
app:defaultValue="false" app:defaultValue="false"
app:key="@string/playback_speed_enabled_key" /> app:key="@string/playback_speed_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_ondemand_video_24"
android:summary="@string/swipe_to_seek_settings_des"
android:title="@string/swipe_to_seek_settings"
app:defaultValue="true"
app:key="@string/swipe_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_ondemand_video_24"
android:summary="@string/swipe_to_change_settings_des"
android:title="@string/swipe_to_change_settings"
app:defaultValue="true"
app:key="@string/swipe_vertical_enabled_key" />
<SwitchPreference <SwitchPreference
android:icon="@drawable/ic_baseline_skip_next_24" android:icon="@drawable/ic_baseline_skip_next_24"
android:summary="@string/autoplay_next_settings_des" android:summary="@string/autoplay_next_settings_des"
@ -75,6 +82,22 @@
app:defaultValue="true" app:defaultValue="true"
android:summary="@string/enable_skip_op_from_database_des" android:summary="@string/enable_skip_op_from_database_des"
app:key="@string/enable_skip_op_from_database" /> app:key="@string/enable_skip_op_from_database" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_gestures">
<SwitchPreference
android:icon="@drawable/ic_baseline_ondemand_video_24"
android:summary="@string/swipe_to_seek_settings_des"
android:title="@string/swipe_to_seek_settings"
app:defaultValue="true"
app:key="@string/swipe_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_ondemand_video_24"
android:summary="@string/swipe_to_change_settings_des"
android:title="@string/swipe_to_change_settings"
app:defaultValue="true"
app:key="@string/swipe_vertical_enabled_key" />
<SwitchPreference <SwitchPreference
android:icon="@drawable/ic_baseline_touch_app_24" android:icon="@drawable/ic_baseline_touch_app_24"
android:summary="@string/double_tap_to_seek_settings_des" android:summary="@string/double_tap_to_seek_settings_des"
@ -99,14 +122,10 @@
app:min="5" app:min="5"
app:seekBarIncrement="5" app:seekBarIncrement="5"
app:showSeekBarValue="true" /> app:showSeekBarValue="true" />
</PreferenceCategory>
<SwitchPreference <PreferenceCategory
android:icon="@drawable/baseline_sync_24" android:title="@string/pref_category_cache">
android:summary="@string/episode_sync_settings_des"
android:title="@string/episode_sync_settings"
app:defaultValue="true"
app:key="@string/episode_sync_enabled_key" />
<Preference <Preference
android:icon="@drawable/ic_baseline_storage_24" android:icon="@drawable/ic_baseline_storage_24"
android:key="@string/video_buffer_disk_key" android:key="@string/video_buffer_disk_key"
@ -129,4 +148,5 @@
android:icon="@drawable/ic_baseline_delete_outline_24" android:icon="@drawable/ic_baseline_delete_outline_24"
android:key="@string/video_buffer_clear_key" android:key="@string/video_buffer_clear_key"
android:title="@string/video_buffer_clear_settings" /> android:title="@string/video_buffer_clear_settings" />
</PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>

View file

@ -1,6 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen 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"> xmlns:app="http://schemas.android.com/apk/res-auto">
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_baseline_bug_report_24"
android:key="acra.disable"
android:summaryOff="@string/bug_report_settings_off"
android:summaryOn="@string/bug_report_settings_on"
android:title="@string/pref_disable_acra" />
<PreferenceCategory
android:title="@string/pref_category_app_updates">
<Preference <Preference
android:title="@string/check_for_update" android:title="@string/check_for_update"
app:icon="@drawable/ic_baseline_system_update_24" app:icon="@drawable/ic_baseline_system_update_24"
@ -19,7 +29,16 @@
android:title="@string/apk_installer_settings" android:title="@string/apk_installer_settings"
android:summary="@string/apk_installer_settings_des" android:summary="@string/apk_installer_settings_des"
/> />
<SwitchPreference
android:icon="@drawable/ic_baseline_notifications_active_24"
android:summary="@string/updates_settings_des"
android:title="@string/updates_settings"
app:defaultValue="true"
app:key="@string/auto_update_key" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_backup">
<Preference <Preference
android:icon="@drawable/baseline_save_as_24" android:icon="@drawable/baseline_save_as_24"
android:key="@string/backup_key" android:key="@string/backup_key"
@ -29,37 +48,33 @@
android:icon="@drawable/baseline_restore_page_24" android:icon="@drawable/baseline_restore_page_24"
android:key="@string/restore_key" android:key="@string/restore_key"
android:title="@string/restore_settings" /> android:title="@string/restore_settings" />
</PreferenceCategory>
<Preference <PreferenceCategory
android:icon="@drawable/baseline_description_24" android:title="@string/pref_category_extensions">
android:key="@string/show_logcat_key"
android:title="@string/show_log_cat" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_baseline_bug_report_24"
android:key="acra.disable"
android:summaryOff="@string/bug_report_settings_off"
android:summaryOn="@string/bug_report_settings_on"
android:title="@string/pref_disable_acra" />
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:icon="@drawable/ic_baseline_extension_24" android:icon="@drawable/ic_baseline_extension_24"
android:key="@string/auto_update_plugins_key" android:key="@string/auto_update_plugins_key"
android:title="@string/automatic_plugin_updates" /> android:title="@string/automatic_plugin_updates" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:icon="@drawable/ic_baseline_extension_24" android:icon="@drawable/ic_baseline_extension_24"
android:key="@string/auto_download_plugins_key" android:key="@string/auto_download_plugins_key"
android:title="@string/automatic_plugin_download" android:title="@string/automatic_plugin_download"
android:summary="@string/automatic_plugin_download_summary" /> android:summary="@string/automatic_plugin_download_summary" />
<SwitchPreference </PreferenceCategory>
android:icon="@drawable/ic_baseline_notifications_active_24"
android:summary="@string/updates_settings_des" <PreferenceCategory
android:title="@string/updates_settings" android:title="@string/pref_category_actions">
app:defaultValue="true" <Preference
app:key="@string/auto_update_key" /> android:icon="@drawable/baseline_description_24"
android:key="@string/show_logcat_key"
android:title="@string/show_log_cat" />
<Preference <Preference
android:icon="@drawable/ic_baseline_construction_24" android:icon="@drawable/ic_baseline_construction_24"
android:title="Redo setup process" android:title="@string/redo_setup_process"
app:key="@string/redo_setup_key" /> app:key="@string/redo_setup_key" />
</PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>

View file

@ -28,6 +28,15 @@
android:title="@string/legal_notice" android:title="@string/legal_notice"
android:icon="@drawable/ic_baseline_warning_24" /> android:icon="@drawable/ic_baseline_warning_24" />
<Preference
android:key="@string/benene_count"
android:title="@string/benene"
android:icon="@drawable/benene"
app:summary="@string/benene_des" />
<PreferenceCategory
android:title="@string/pref_category_links">
<Preference <Preference
android:title="@string/github" android:title="@string/github"
android:icon="@drawable/ic_github_logo" android:icon="@drawable/ic_github_logo"
@ -53,9 +62,6 @@
android:action="android.intent.action.VIEW" android:action="android.intent.action.VIEW"
android:data="https://discord.gg/5Hus6fM" /> android:data="https://discord.gg/5Hus6fM" />
</Preference> </Preference>
<Preference
android:key="@string/benene_count" </PreferenceCategory>
android:title="@string/benene"
android:icon="@drawable/benene"
app:summary="@string/benene_des" />
</PreferenceScreen> </PreferenceScreen>

View file

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen 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"> xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
android:title="@string/pref_category_looks">
<Preference <Preference
android:icon="@drawable/ic_baseline_color_lens_24" android:icon="@drawable/ic_baseline_color_lens_24"
android:key="@string/primary_color_key" android:key="@string/primary_color_key"
@ -13,6 +16,16 @@
android:icon="@drawable/ic_baseline_tv_24" android:icon="@drawable/ic_baseline_tv_24"
android:key="@string/app_layout_key" android:key="@string/app_layout_key"
android:title="@string/app_layout" /> android:title="@string/app_layout" />
<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/baseline_grid_view_24"
android:key="@string/bottom_title_key"
android:summary="@string/bottom_title_settings_des"
android:title="@string/bottom_title_settings" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_ui_features">
<Preference <Preference
android:icon="@drawable/ic_baseline_tv_24" android:icon="@drawable/ic_baseline_tv_24"
android:key="@string/poster_ui_key" android:key="@string/poster_ui_key"
@ -23,12 +36,6 @@
android:title="@string/advanced_search" android:title="@string/advanced_search"
android:summary="@string/advanced_search_des" android:summary="@string/advanced_search_des"
app:defaultValue="true" /> app:defaultValue="true" />
<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/baseline_grid_view_24"
android:key="@string/bottom_title_key"
android:summary="@string/bottom_title_settings_des"
android:title="@string/bottom_title_settings" />
<SwitchPreference <SwitchPreference
android:key="@string/show_trailers_key" android:key="@string/show_trailers_key"
android:icon="@drawable/baseline_theaters_24" android:icon="@drawable/baseline_theaters_24"
@ -54,4 +61,5 @@
android:icon="@drawable/ic_baseline_filter_list_24" android:icon="@drawable/ic_baseline_filter_list_24"
android:key="@string/pref_filter_search_quality_key" android:key="@string/pref_filter_search_quality_key"
android:title="@string/pref_filter_search_quality" /> android:title="@string/pref_filter_search_quality" />
</PreferenceCategory>
</PreferenceScreen> </PreferenceScreen>