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="updates_settings">Show app updates</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_des">Search for prerelease updates instead of full releases only</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
CloudStream 3 at your own risk.
</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="random_button_settings">Random Button</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="colorOnPrimary">@color/material_dynamic_primary20</item>
<!-- Needed for leanback fuckery -->
<item name="android:colorAccent">@color/material_dynamic_primary30</item>
<item name="android:colorAccent">@color/material_dynamic_primary80</item>
</style>
<style name="OverlayPrimaryColorMonetTwo">
@ -168,7 +168,7 @@
<item name="colorAccent">@color/material_dynamic_secondary80</item>
<item name="colorOnPrimary">@color/material_dynamic_secondary20</item>
<!-- Needed for leanback fuckery -->
<item name="android:colorAccent">@color/material_dynamic_secondary30</item>
<item name="android:colorAccent">@color/material_dynamic_secondary80</item>
</style>
<style name="OverlayPrimaryColorBlue">

View file

@ -1,104 +1,6 @@
<?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">
<Preference
android:icon="@drawable/ic_outline_subtitles_24"
android:key="@string/subtitle_settings_key"
android:title="@string/player_subtitles_settings"
app:summary="@string/player_subtitles_settings_des" />
<Preference
android:icon="@drawable/ic_outline_subtitles_24"
android:key="@string/subtitle_settings_chromecast_key"
android:title="@string/chromecast_subtitles_settings"
app:summary="@string/chromecast_subtitles_settings_des" />
<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" />
<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
android:icon="@drawable/ic_baseline_picture_in_picture_alt_24"
android:summary="@string/picture_in_picture_des"
android:title="@string/picture_in_picture"
app:defaultValue="true"
app:key="@string/pip_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_aspect_ratio_24"
android:summary="@string/player_size_settings_des"
android:title="@string/player_size_settings"
app:defaultValue="true"
app:key="@string/player_resize_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_speed_24"
android:summary="@string/eigengraumode_settings_des"
android:title="@string/eigengraumode_settings"
app:defaultValue="false"
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
android:icon="@drawable/ic_baseline_skip_next_24"
android:summary="@string/autoplay_next_settings_des"
android:title="@string/autoplay_next_settings"
app:defaultValue="true"
app:key="@string/autoplay_next_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_skip_next_24"
android:title="@string/video_skip_op"
app:defaultValue="true"
android:summary="@string/enable_skip_op_from_database_des"
app:key="@string/enable_skip_op_from_database" />
<SwitchPreference
android:icon="@drawable/ic_baseline_touch_app_24"
android:summary="@string/double_tap_to_seek_settings_des"
android:title="@string/double_tap_to_seek_settings"
app:defaultValue="false"
app:key="@string/double_tap_enabled_key" />
<SwitchPreference
android:icon="@drawable/netflix_pause"
android:summary="@string/double_tap_to_pause_settings_des"
android:title="@string/double_tap_to_pause_settings"
app:defaultValue="false"
app:key="@string/double_tap_pause_enabled_key" />
<SeekBarPreference
android:defaultValue="10"
android:max="60"
android:title="@string/double_tap_to_seek_amount_settings"
app:adjustable="true"
app:defaultValue="10"
app:icon="@drawable/go_forward_30"
app:key="@string/double_tap_seek_time_key"
app:min="5"
app:seekBarIncrement="5"
app:showSeekBarValue="true" />
<SwitchPreference
android:icon="@drawable/baseline_sync_24"
@ -107,26 +9,144 @@
app:defaultValue="true"
app:key="@string/episode_sync_enabled_key" />
<Preference
android:icon="@drawable/ic_baseline_storage_24"
android:key="@string/video_buffer_disk_key"
android:summary="@string/video_disk_description"
android:title="@string/video_buffer_disk_settings" />
<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/ic_baseline_storage_24"
android:key="@string/video_buffer_size_key"
android:summary="@string/video_ram_description"
android:title="@string/video_buffer_size_settings" />
<Preference
android:icon="@drawable/netflix_play"
android:key="@string/player_pref_key"
android:title="@string/player_pref" />
</PreferenceCategory>
<Preference
android:icon="@drawable/ic_baseline_storage_24"
android:key="@string/video_buffer_length_key"
android:summary="@string/video_ram_description"
android:title="@string/video_buffer_length_settings" />
<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_delete_outline_24"
android:key="@string/video_buffer_clear_key"
android:title="@string/video_buffer_clear_settings" />
<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
android:icon="@drawable/ic_outline_subtitles_24"
android:key="@string/subtitle_settings_key"
android:title="@string/player_subtitles_settings"
app:summary="@string/player_subtitles_settings_des" />
<Preference
android:icon="@drawable/ic_outline_subtitles_24"
android:key="@string/subtitle_settings_chromecast_key"
android:title="@string/chromecast_subtitles_settings"
app:summary="@string/chromecast_subtitles_settings_des" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_player_features">
<SwitchPreference
android:icon="@drawable/ic_baseline_picture_in_picture_alt_24"
android:summary="@string/picture_in_picture_des"
android:title="@string/picture_in_picture"
app:defaultValue="true"
app:key="@string/pip_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_aspect_ratio_24"
android:summary="@string/player_size_settings_des"
android:title="@string/player_size_settings"
app:defaultValue="true"
app:key="@string/player_resize_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_speed_24"
android:summary="@string/eigengraumode_settings_des"
android:title="@string/eigengraumode_settings"
app:defaultValue="false"
app:key="@string/playback_speed_enabled_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_skip_next_24"
android:summary="@string/autoplay_next_settings_des"
android:title="@string/autoplay_next_settings"
app:defaultValue="true"
app:key="@string/autoplay_next_key" />
<SwitchPreference
android:icon="@drawable/ic_baseline_skip_next_24"
android:title="@string/video_skip_op"
app:defaultValue="true"
android:summary="@string/enable_skip_op_from_database_des"
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
android:icon="@drawable/ic_baseline_touch_app_24"
android:summary="@string/double_tap_to_seek_settings_des"
android:title="@string/double_tap_to_seek_settings"
app:defaultValue="false"
app:key="@string/double_tap_enabled_key" />
<SwitchPreference
android:icon="@drawable/netflix_pause"
android:summary="@string/double_tap_to_pause_settings_des"
android:title="@string/double_tap_to_pause_settings"
app:defaultValue="false"
app:key="@string/double_tap_pause_enabled_key" />
<SeekBarPreference
android:defaultValue="10"
android:max="60"
android:title="@string/double_tap_to_seek_amount_settings"
app:adjustable="true"
app:defaultValue="10"
app:icon="@drawable/go_forward_30"
app:key="@string/double_tap_seek_time_key"
app:min="5"
app:seekBarIncrement="5"
app:showSeekBarValue="true" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_cache">
<Preference
android:icon="@drawable/ic_baseline_storage_24"
android:key="@string/video_buffer_disk_key"
android:summary="@string/video_disk_description"
android:title="@string/video_buffer_disk_settings" />
<Preference
android:icon="@drawable/ic_baseline_storage_24"
android:key="@string/video_buffer_size_key"
android:summary="@string/video_ram_description"
android:title="@string/video_buffer_size_settings" />
<Preference
android:icon="@drawable/ic_baseline_storage_24"
android:key="@string/video_buffer_length_key"
android:summary="@string/video_ram_description"
android:title="@string/video_buffer_length_settings" />
<Preference
android:icon="@drawable/ic_baseline_delete_outline_24"
android:key="@string/video_buffer_clear_key"
android:title="@string/video_buffer_clear_settings" />
</PreferenceCategory>
</PreferenceScreen>

View file

@ -1,39 +1,6 @@
<?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">
<Preference
android:title="@string/check_for_update"
app:icon="@drawable/ic_baseline_system_update_24"
app:key="@string/manual_check_update_key"
app:summary="@string/app_version" />
<SwitchPreference
android:icon="@drawable/ic_baseline_developer_mode_24"
android:summary="@string/uprereleases_settings_des"
android:title="@string/uprereleases_settings"
app:defaultValue="@bool/is_prerelease"
app:key="@string/prerelease_update_key" />
<Preference
android:icon="@drawable/netflix_download"
android:key="@string/apk_installer_key"
android:title="@string/apk_installer_settings"
android:summary="@string/apk_installer_settings_des"
/>
<Preference
android:icon="@drawable/baseline_save_as_24"
android:key="@string/backup_key"
android:title="@string/backup_settings" />
<Preference
android:icon="@drawable/baseline_restore_page_24"
android:key="@string/restore_key"
android:title="@string/restore_settings" />
<Preference
android:icon="@drawable/baseline_description_24"
android:key="@string/show_logcat_key"
android:title="@string/show_log_cat" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_baseline_bug_report_24"
@ -41,25 +8,73 @@
android:summaryOff="@string/bug_report_settings_off"
android:summaryOn="@string/bug_report_settings_on"
android:title="@string/pref_disable_acra" />
<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_baseline_extension_24"
android:key="@string/auto_update_plugins_key"
android:title="@string/automatic_plugin_updates" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_baseline_extension_24"
android:key="@string/auto_download_plugins_key"
android:title="@string/automatic_plugin_download"
android:summary="@string/automatic_plugin_download_summary" />
<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" />
<Preference
android:icon="@drawable/ic_baseline_construction_24"
android:title="Redo setup process"
app:key="@string/redo_setup_key" />
<PreferenceCategory
android:title="@string/pref_category_app_updates">
<Preference
android:title="@string/check_for_update"
app:icon="@drawable/ic_baseline_system_update_24"
app:key="@string/manual_check_update_key"
app:summary="@string/app_version" />
<SwitchPreference
android:icon="@drawable/ic_baseline_developer_mode_24"
android:summary="@string/uprereleases_settings_des"
android:title="@string/uprereleases_settings"
app:defaultValue="@bool/is_prerelease"
app:key="@string/prerelease_update_key" />
<Preference
android:icon="@drawable/netflix_download"
android:key="@string/apk_installer_key"
android:title="@string/apk_installer_settings"
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
android:icon="@drawable/baseline_save_as_24"
android:key="@string/backup_key"
android:title="@string/backup_settings" />
<Preference
android:icon="@drawable/baseline_restore_page_24"
android:key="@string/restore_key"
android:title="@string/restore_settings" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_extensions">
<SwitchPreference
android:defaultValue="true"
android:icon="@drawable/ic_baseline_extension_24"
android:key="@string/auto_update_plugins_key"
android:title="@string/automatic_plugin_updates" />
<SwitchPreference
android:defaultValue="false"
android:icon="@drawable/ic_baseline_extension_24"
android:key="@string/auto_download_plugins_key"
android:title="@string/automatic_plugin_download"
android:summary="@string/automatic_plugin_download_summary" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_actions">
<Preference
android:icon="@drawable/baseline_description_24"
android:key="@string/show_logcat_key"
android:title="@string/show_log_cat" />
<Preference
android:icon="@drawable/ic_baseline_construction_24"
android:title="@string/redo_setup_process"
app:key="@string/redo_setup_key" />
</PreferenceCategory>
</PreferenceScreen>

View file

@ -29,33 +29,39 @@
android:icon="@drawable/ic_baseline_warning_24" />
<Preference
android:title="@string/github"
android:icon="@drawable/ic_github_logo"
app:summary="https://github.com/recloudstream/cloudstream">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/recloudstream/cloudstream" />
</Preference>
android:key="@string/benene_count"
android:title="@string/benene"
android:icon="@drawable/benene"
app:summary="@string/benene_des" />
<Preference
android:title="@string/lightnovel"
android:icon="@drawable/quick_novel_icon"
app:summary="https://github.com/LagradOst/QuickNovel">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/LagradOst/QuickNovel" />
</Preference>
<Preference
android:title="@string/discord"
android:icon="@drawable/ic_baseline_discord_24"
app:summary="https://discord.gg/5Hus6fM">
<intent
android:action="android.intent.action.VIEW"
android:data="https://discord.gg/5Hus6fM" />
</Preference>
<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
android:title="@string/github"
android:icon="@drawable/ic_github_logo"
app:summary="https://github.com/recloudstream/cloudstream">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/recloudstream/cloudstream" />
</Preference>
<Preference
android:title="@string/lightnovel"
android:icon="@drawable/quick_novel_icon"
app:summary="https://github.com/LagradOst/QuickNovel">
<intent
android:action="android.intent.action.VIEW"
android:data="https://github.com/LagradOst/QuickNovel" />
</Preference>
<Preference
android:title="@string/discord"
android:icon="@drawable/ic_baseline_discord_24"
app:summary="https://discord.gg/5Hus6fM">
<intent
android:action="android.intent.action.VIEW"
android:data="https://discord.gg/5Hus6fM" />
</Preference>
</PreferenceCategory>
</PreferenceScreen>

View file

@ -1,57 +1,65 @@
<?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">
<Preference
android:icon="@drawable/ic_baseline_color_lens_24"
android:key="@string/primary_color_key"
android:title="@string/primary_color_settings" />
<Preference
android:icon="@drawable/ic_baseline_color_lens_24"
android:key="@string/app_theme_key"
android:title="@string/app_theme_settings" />
<Preference
android:icon="@drawable/ic_baseline_tv_24"
android:key="@string/app_layout_key"
android:title="@string/app_layout" />
<Preference
android:icon="@drawable/ic_baseline_tv_24"
android:key="@string/poster_ui_key"
android:title="@string/poster_ui_settings" />
<SwitchPreference
android:icon="@drawable/search_icon"
app:key="advanced_search"
android:title="@string/advanced_search"
android:summary="@string/advanced_search_des"
app:defaultValue="true" />
<SwitchPreference
<PreferenceCategory
android:title="@string/pref_category_looks">
<Preference
android:icon="@drawable/ic_baseline_color_lens_24"
android:key="@string/primary_color_key"
android:title="@string/primary_color_settings" />
<Preference
android:icon="@drawable/ic_baseline_color_lens_24"
android:key="@string/app_theme_key"
android:title="@string/app_theme_settings" />
<Preference
android:icon="@drawable/ic_baseline_tv_24"
android:key="@string/app_layout_key"
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" />
<SwitchPreference
android:key="@string/show_trailers_key"
android:icon="@drawable/baseline_theaters_24"
android:title="@string/show_trailers_settings"
android:defaultValue="true" />
<SwitchPreference
android:key="@string/show_kitsu_posters_key"
android:icon="@drawable/kitsu_icon"
android:title="@string/kitsu_settings"
android:defaultValue="true" />
<SwitchPreference
android:key="@string/show_fillers_key"
android:icon="@drawable/ic_baseline_skip_next_24"
android:title="@string/show_fillers_settings"
android:defaultValue="false" />
<SwitchPreference
android:icon="@drawable/ic_baseline_play_arrow_24"
app:key="@string/random_button_key"
android:title="@string/random_button_settings"
android:summary="@string/random_button_settings_desc"
app:defaultValue="false" />
<Preference
android:icon="@drawable/ic_baseline_filter_list_24"
android:key="@string/pref_filter_search_quality_key"
android:title="@string/pref_filter_search_quality" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_category_ui_features">
<Preference
android:icon="@drawable/ic_baseline_tv_24"
android:key="@string/poster_ui_key"
android:title="@string/poster_ui_settings" />
<SwitchPreference
android:icon="@drawable/search_icon"
app:key="advanced_search"
android:title="@string/advanced_search"
android:summary="@string/advanced_search_des"
app:defaultValue="true" />
<SwitchPreference
android:key="@string/show_trailers_key"
android:icon="@drawable/baseline_theaters_24"
android:title="@string/show_trailers_settings"
android:defaultValue="true" />
<SwitchPreference
android:key="@string/show_kitsu_posters_key"
android:icon="@drawable/kitsu_icon"
android:title="@string/kitsu_settings"
android:defaultValue="true" />
<SwitchPreference
android:key="@string/show_fillers_key"
android:icon="@drawable/ic_baseline_skip_next_24"
android:title="@string/show_fillers_settings"
android:defaultValue="false" />
<SwitchPreference
android:icon="@drawable/ic_baseline_play_arrow_24"
app:key="@string/random_button_key"
android:title="@string/random_button_settings"
android:summary="@string/random_button_settings_desc"
app:defaultValue="false" />
<Preference
android:icon="@drawable/ic_baseline_filter_list_24"
android:key="@string/pref_filter_search_quality_key"
android:title="@string/pref_filter_search_quality" />
</PreferenceCategory>
</PreferenceScreen>