From 1b27ac6f2b7c046945fc97e2aff9adbde8a152ce Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Tue, 22 Feb 2022 11:52:05 -0700 Subject: [PATCH] Combine drawable files. https://redmine.stoutner.com/issues/794 --- .../activities/BookmarksActivity.java | 32 +- .../BookmarksDatabaseViewActivity.java | 28 +- .../activities/DomainsActivity.java | 34 +- .../activities/MainWebViewActivity.java | 102 +- .../adapters/PinnedMismatchPagerAdapter.kt | 19 +- .../dialogs/AboutViewSourceDialog.kt | 2 +- .../privacybrowser/dialogs/AddDomainDialog.kt | 4 +- .../privacybrowser/dialogs/FontSizeDialog.kt | 2 +- .../dialogs/HttpAuthenticationDialog.kt | 18 +- .../dialogs/MoveToFolderDialog.kt | 4 +- .../privacybrowser/dialogs/OpenDialog.kt | 4 +- .../dialogs/PinnedMismatchDialog.kt | 4 +- .../dialogs/ProxyNotInstalledDialog.kt | 4 +- .../privacybrowser/dialogs/SaveDialog.kt | 4 +- .../dialogs/SslCertificateErrorDialog.kt | 61 +- .../dialogs/UntrustedSslCertificateDialog.kt | 4 +- .../dialogs/ViewRequestDialog.kt | 4 +- .../dialogs/ViewSslCertificateDialog.kt | 21 +- .../fragments/DomainSettingsFragment.java | 731 ++++-------- .../fragments/DomainsListFragment.java | 12 +- .../fragments/SettingsFragment.java | 1022 ++++------------- .../res/drawable/{about_day.xml => about.xml} | 2 +- .../{about_blue_day.xml => about_blue.xml} | 2 +- .../main/res/drawable/about_blue_night.xml | 13 - app/src/main/res/drawable/about_night.xml | 13 - app/src/main/res/drawable/add.xml | 2 +- ...ght.xml => allow_screenshots_disabled.xml} | 2 +- ..._day.xml => allow_screenshots_enabled.xml} | 2 +- .../allow_screenshots_enabled_day.xml | 13 - .../allow_screenshots_enabled_night.xml | 13 - ...r_enabled_day.xml => app_bar_disabled.xml} | 2 +- .../res/drawable/app_bar_disabled_day.xml | 13 - .../res/drawable/app_bar_disabled_night.xml | 13 - ...ar_ghosted_day.xml => app_bar_enabled.xml} | 2 +- ..._enabled_night.xml => app_bar_ghosted.xml} | 2 +- .../res/drawable/app_bar_ghosted_night.xml | 13 - .../{app_theme_day.xml => app_theme.xml} | 2 +- app/src/main/res/drawable/app_theme_night.xml | 14 - app/src/main/res/drawable/back.xml | 2 +- ...abled_night.xml => block_ads_disabled.xml} | 4 +- ...disabled_day.xml => block_ads_enabled.xml} | 2 +- .../res/drawable/block_ads_enabled_day.xml | 13 - .../res/drawable/block_ads_enabled_night.xml | 13 - ...ock_all_third_party_requests_disabled.xml} | 2 +- ..._all_third_party_requests_disabled_day.xml | 13 - ...lock_all_third_party_requests_enabled.xml} | 2 +- ...all_third_party_requests_enabled_night.xml | 13 - ..._night.xml => block_tracking_disabled.xml} | 2 +- ...led_day.xml => block_tracking_enabled.xml} | 2 +- .../drawable/block_tracking_enabled_day.xml | 14 - .../drawable/block_tracking_enabled_night.xml | 14 - .../{bookmarks_day.xml => bookmarks.xml} | 2 +- app/src/main/res/drawable/bookmarks_night.xml | 13 - ...ed_day.xml => bottom_app_bar_disabled.xml} | 2 +- .../bottom_app_bar_disabled_night.xml | 13 - ...led_day.xml => bottom_app_bar_enabled.xml} | 2 +- .../drawable/bottom_app_bar_enabled_night.xml | 13 - app/src/main/res/drawable/bug_cleared_day.xml | 13 - .../main/res/drawable/bug_cleared_night.xml | 13 - .../main/res/drawable/cache_cleared_night.xml | 14 - ...e_warning.xml => clear_cache_disabled.xml} | 0 ...leared_day.xml => clear_cache_enabled.xml} | 2 +- ...warning.xml => clear_cookies_disabled.xml} | 0 ...ared_day.xml => clear_cookies_enabled.xml} | 2 +- ...ing.xml => clear_dom_storage_disabled.xml} | 0 ...ight.xml => clear_dom_storage_enabled.xml} | 4 +- ...d_day.xml => clear_everything_enabled.xml} | 2 +- .../clear_everything_enabled_night.xml | 13 - ...rning.xml => clear_form_data_disabled.xml} | 0 ...ed_day.xml => clear_form_data_enabled.xml} | 2 +- ..._warning.xml => clear_logcat_disabled.xml} | 0 .../{bug.xml => clear_logcat_enabled.xml} | 2 +- .../res/drawable/{close_day.xml => close.xml} | 2 +- .../{close_blue_day.xml => close_blue.xml} | 4 +- .../main/res/drawable/close_blue_night.xml | 13 - app/src/main/res/drawable/close_night.xml | 13 - ...cleared_night.xml => cookies_disabled.xml} | 2 +- .../res/drawable/cookies_disabled_day.xml | 14 - .../res/drawable/cookies_disabled_night.xml | 14 - .../res/drawable/{copy_night.xml => copy.xml} | 2 +- app/src/main/res/drawable/copy_day.xml | 14 - .../main/res/drawable/copy_enabled_day.xml | 14 - .../main/res/drawable/copy_enabled_night.xml | 14 - app/src/main/res/drawable/create_bookmark.xml | 2 +- app/src/main/res/drawable/create_folder.xml | 2 +- ..._day.xml => custom_user_agent_enabled.xml} | 4 +- ...ight.xml => custom_user_agent_ghosted.xml} | 4 +- .../custom_user_agent_ghosted_day.xml | 14 - .../custom_user_agent_ghosted_night.xml | 14 - .../{delete_day.xml => delete_enabled.xml} | 2 +- app/src/main/res/drawable/delete_night.xml | 13 - .../res/drawable/dom_storage_cleared_day.xml | 14 - ...abled_day.xml => dom_storage_disabled.xml} | 2 +- ...ared_night.xml => dom_storage_ghosted.xml} | 2 +- .../res/drawable/dom_storage_ghosted_day.xml | 14 - .../drawable/dom_storage_ghosted_night.xml | 14 - ...xml => domain_settings_url_background.xml} | 3 +- .../drawable/{domains_day.xml => domains.xml} | 4 +- app/src/main/res/drawable/domains_night.xml | 14 - ...downloads_enabled_day.xml => download.xml} | 2 +- ...> download_with_external_app_disabled.xml} | 4 +- ...=> download_with_external_app_enabled.xml} | 4 +- ...download_with_external_app_enabled_day.xml | 36 - ...wnload_with_external_app_enabled_night.xml | 36 - .../res/drawable/downloads_enabled_night.xml | 13 - .../res/drawable/{edit_night.xml => edit.xml} | 2 +- app/src/main/res/drawable/edit_day.xml | 14 - .../{font_size_day.xml => font_size.xml} | 2 +- app/src/main/res/drawable/font_size_night.xml | 14 - .../res/drawable/form_data_cleared_day.xml | 14 - ...eared_night.xml => form_data_disabled.xml} | 2 +- .../res/drawable/form_data_disabled_night.xml | 14 - ...led_night.xml => full_screen_disabled.xml} | 2 +- ...sabled_day.xml => full_screen_enabled.xml} | 2 +- .../res/drawable/full_screen_enabled_day.xml | 13 - .../drawable/full_screen_enabled_night.xml | 13 - .../{home_enabled_day.xml => home.xml} | 2 +- .../main/res/drawable/home_enabled_night.xml | 13 - .../{images_options_night.xml => image.xml} | 2 +- ...es_enabled_day.xml => images_disabled.xml} | 2 +- .../main/res/drawable/images_disabled_day.xml | 14 - ..._disabled_night.xml => images_enabled.xml} | 2 +- .../res/drawable/images_enabled_night.xml | 14 - .../main/res/drawable/images_options_day.xml | 14 - ..._night.xml => incognito_mode_disabled.xml} | 2 +- ...led_day.xml => incognito_mode_enabled.xml} | 2 +- .../drawable/incognito_mode_enabled_day.xml | 14 - .../drawable/incognito_mode_enabled_night.xml | 14 - .../res/drawable/{lock_day.xml => lock.xml} | 2 +- app/src/main/res/drawable/lock_night.xml | 13 - ...bled_night.xml => modify_url_disabled.xml} | 2 +- ...isabled_day.xml => modify_url_enabled.xml} | 2 +- .../res/drawable/modify_url_enabled_day.xml | 14 - .../res/drawable/modify_url_enabled_night.xml | 14 - ...e_disabled_night.xml => more_disabled.xml} | 2 +- ...more_disabled_day.xml => more_enabled.xml} | 4 +- .../main/res/drawable/more_enabled_day.xml | 14 - .../main/res/drawable/more_enabled_night.xml | 14 - ...nabled_night.xml => move_down_enabled.xml} | 2 +- .../res/drawable/move_down_enabled_day.xml | 13 - ...to_folder_night.xml => move_to_folder.xml} | 2 +- ...folder_day.xml => move_to_folder_blue.xml} | 2 +- .../res/drawable/move_to_folder_blue_day.xml | 32 - .../drawable/move_to_folder_blue_night.xml | 32 - ..._enabled_night.xml => move_up_enabled.xml} | 2 +- .../main/res/drawable/move_up_enabled_day.xml | 13 - ...oxy_enabled_day.xml => proxy_disabled.xml} | 2 +- ...oxy_disabled_day.xml => proxy_enabled.xml} | 2 +- .../main/res/drawable/proxy_enabled_night.xml | 13 - ...y_disabled_night.xml => proxy_ghosted.xml} | 2 +- .../main/res/drawable/proxy_ghosted_day.xml | 13 - .../main/res/drawable/proxy_ghosted_night.xml | 13 - ...isabled_night.xml => refresh_disabled.xml} | 2 +- ...h_disabled_day.xml => refresh_enabled.xml} | 2 +- .../main/res/drawable/refresh_enabled_day.xml | 14 - .../res/drawable/refresh_enabled_night.xml | 14 - .../res/drawable/{save_night.xml => save.xml} | 2 +- app/src/main/res/drawable/save_day.xml | 14 - .../{save_text_night.xml => save_text.xml} | 2 +- app/src/main/res/drawable/save_text_day.xml | 14 - .../{search_enabled_day.xml => search.xml} | 2 +- ...bled_day.xml => search_custom_enabled.xml} | 2 +- ...ed_night.xml => search_custom_ghosted.xml} | 2 +- .../search_custom_url_ghosted_day.xml | 14 - .../search_custom_url_ghosted_night.xml | 14 - .../res/drawable/search_enabled_night.xml | 14 - .../{select_all_night.xml => select_all.xml} | 2 +- app/src/main/res/drawable/select_all_day.xml | 13 - .../drawable/{share_night.xml => share.xml} | 2 +- app/src/main/res/drawable/share_day.xml | 14 - ...bled_day.xml => social_media_disabled.xml} | 2 +- ...abled_day.xml => social_media_enabled.xml} | 2 +- .../drawable/social_media_enabled_night.xml | 14 - ...led_night.xml => social_media_ghosted.xml} | 2 +- .../res/drawable/social_media_ghosted_day.xml | 14 - .../drawable/social_media_ghosted_night.xml | 14 - .../res/drawable/{sort_night.xml => sort.xml} | 2 +- app/src/main/res/drawable/sort_day.xml | 14 - ...ort_selected_day.xml => sort_selected.xml} | 4 +- .../main/res/drawable/sort_selected_night.xml | 36 - ...night.xml => ssl_certificate_disabled.xml} | 2 +- ...ed_day.xml => ssl_certificate_enabled.xml} | 2 +- .../drawable/ssl_certificate_enabled_day.xml | 14 - .../ssl_certificate_enabled_night.xml | 14 - ...ab_disabled_night.xml => tab_disabled.xml} | 2 +- .../{tab_disabled_day.xml => tab_enabled.xml} | 2 +- app/src/main/res/drawable/tab_enabled_day.xml | 14 - .../main/res/drawable/tab_enabled_night.xml | 14 - .../url_bar_background_light_green.xml | 30 - .../{user_agent_day.xml => user_agent.xml} | 2 +- .../main/res/drawable/user_agent_night.xml | 14 - ...theme_night.xml => webview_dark_theme.xml} | 2 +- ..._theme_day.xml => webview_light_theme.xml} | 2 +- .../res/drawable/webview_light_theme_day.xml | 32 - .../drawable/webview_light_theme_night.xml | 32 - ...d_night.xml => wide_viewport_disabled.xml} | 2 +- ...bled_day.xml => wide_viewport_enabled.xml} | 2 +- .../drawable/wide_viewport_enabled_day.xml | 13 - .../drawable/wide_viewport_enabled_night.xml | 13 - .../bookmarks_drawer_bottom_appbar.xml | 6 +- .../bookmarks_drawer_top_appbar.xml | 6 +- .../layout/bookmarks_drawer_bottom_appbar.xml | 6 +- .../layout/bookmarks_drawer_top_appbar.xml | 6 +- .../res/layout/domain_settings_fragment.xml | 6 +- .../layout/main_framelayout_bottom_appbar.xml | 10 +- .../layout/main_framelayout_top_appbar.xml | 10 +- .../res/menu/about_version_options_menu.xml | 12 +- .../main/res/menu/bookmarks_context_menu.xml | 10 +- .../bookmarks_databaseview_context_menu.xml | 6 +- .../bookmarks_databaseview_options_menu.xml | 3 +- .../main/res/menu/bookmarks_options_menu.xml | 3 +- .../main/res/menu/domains_options_menu.xml | 2 +- app/src/main/res/menu/logcat_options_menu.xml | 9 +- .../res/menu/view_source_options_menu.xml | 4 +- .../webview_navigation_menu_bottom_appbar.xml | 16 +- .../webview_navigation_menu_top_appbar.xml | 16 +- .../main/res/menu/webview_options_menu.xml | 5 +- app/src/main/res/values-night-v27/styles.xml | 37 - app/src/main/res/values-night/colors.xml | 7 + app/src/main/res/values-night/styles.xml | 37 - app/src/main/res/values-v27/styles.xml | 37 - app/src/main/res/values/attrs.xml | 35 - app/src/main/res/values/colors.xml | 7 + app/src/main/res/values/styles.xml | 37 - app/src/main/res/xml/preferences.xml | 10 +- 225 files changed, 687 insertions(+), 3292 deletions(-) rename app/src/main/res/drawable/{about_day.xml => about.xml} (93%) rename app/src/main/res/drawable/{about_blue_day.xml => about_blue.xml} (92%) delete mode 100644 app/src/main/res/drawable/about_blue_night.xml delete mode 100644 app/src/main/res/drawable/about_night.xml rename app/src/main/res/drawable/{allow_screenshots_disabled_night.xml => allow_screenshots_disabled.xml} (92%) rename app/src/main/res/drawable/{allow_screenshots_disabled_day.xml => allow_screenshots_enabled.xml} (93%) delete mode 100644 app/src/main/res/drawable/allow_screenshots_enabled_day.xml delete mode 100644 app/src/main/res/drawable/allow_screenshots_enabled_night.xml rename app/src/main/res/drawable/{app_bar_enabled_day.xml => app_bar_disabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/app_bar_disabled_day.xml delete mode 100644 app/src/main/res/drawable/app_bar_disabled_night.xml rename app/src/main/res/drawable/{app_bar_ghosted_day.xml => app_bar_enabled.xml} (92%) rename app/src/main/res/drawable/{app_bar_enabled_night.xml => app_bar_ghosted.xml} (91%) delete mode 100644 app/src/main/res/drawable/app_bar_ghosted_night.xml rename app/src/main/res/drawable/{app_theme_day.xml => app_theme.xml} (95%) delete mode 100644 app/src/main/res/drawable/app_theme_night.xml rename app/src/main/res/drawable/{block_ads_disabled_night.xml => block_ads_disabled.xml} (91%) rename app/src/main/res/drawable/{block_ads_disabled_day.xml => block_ads_enabled.xml} (93%) delete mode 100644 app/src/main/res/drawable/block_ads_enabled_day.xml delete mode 100644 app/src/main/res/drawable/block_ads_enabled_night.xml rename app/src/main/res/drawable/{block_all_third_party_requests_enabled_day.xml => block_all_third_party_requests_disabled.xml} (92%) delete mode 100644 app/src/main/res/drawable/block_all_third_party_requests_disabled_day.xml rename app/src/main/res/drawable/{block_all_third_party_requests_disabled_night.xml => block_all_third_party_requests_enabled.xml} (93%) delete mode 100644 app/src/main/res/drawable/block_all_third_party_requests_enabled_night.xml rename app/src/main/res/drawable/{block_tracking_disabled_night.xml => block_tracking_disabled.xml} (93%) rename app/src/main/res/drawable/{block_tracking_disabled_day.xml => block_tracking_enabled.xml} (94%) delete mode 100644 app/src/main/res/drawable/block_tracking_enabled_day.xml delete mode 100644 app/src/main/res/drawable/block_tracking_enabled_night.xml rename app/src/main/res/drawable/{bookmarks_day.xml => bookmarks.xml} (91%) delete mode 100644 app/src/main/res/drawable/bookmarks_night.xml rename app/src/main/res/drawable/{bottom_app_bar_disabled_day.xml => bottom_app_bar_disabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/bottom_app_bar_disabled_night.xml rename app/src/main/res/drawable/{bottom_app_bar_enabled_day.xml => bottom_app_bar_enabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/bottom_app_bar_enabled_night.xml delete mode 100644 app/src/main/res/drawable/bug_cleared_day.xml delete mode 100644 app/src/main/res/drawable/bug_cleared_night.xml delete mode 100644 app/src/main/res/drawable/cache_cleared_night.xml rename app/src/main/res/drawable/{cache_warning.xml => clear_cache_disabled.xml} (100%) rename app/src/main/res/drawable/{cache_cleared_day.xml => clear_cache_enabled.xml} (93%) rename app/src/main/res/drawable/{cookies_warning.xml => clear_cookies_disabled.xml} (100%) rename app/src/main/res/drawable/{cookies_cleared_day.xml => clear_cookies_enabled.xml} (95%) rename app/src/main/res/drawable/{dom_storage_warning.xml => clear_dom_storage_disabled.xml} (100%) rename app/src/main/res/drawable/{dom_storage_disabled_night.xml => clear_dom_storage_enabled.xml} (91%) rename app/src/main/res/drawable/{clear_everything_enabled_day.xml => clear_everything_enabled.xml} (93%) delete mode 100644 app/src/main/res/drawable/clear_everything_enabled_night.xml rename app/src/main/res/drawable/{form_data_warning.xml => clear_form_data_disabled.xml} (100%) rename app/src/main/res/drawable/{form_data_disabled_day.xml => clear_form_data_enabled.xml} (92%) rename app/src/main/res/drawable/{bug_warning.xml => clear_logcat_disabled.xml} (100%) rename app/src/main/res/drawable/{bug.xml => clear_logcat_enabled.xml} (94%) rename app/src/main/res/drawable/{close_day.xml => close.xml} (92%) rename app/src/main/res/drawable/{close_blue_day.xml => close_blue.xml} (89%) delete mode 100644 app/src/main/res/drawable/close_blue_night.xml delete mode 100644 app/src/main/res/drawable/close_night.xml rename app/src/main/res/drawable/{cookies_cleared_night.xml => cookies_disabled.xml} (95%) delete mode 100644 app/src/main/res/drawable/cookies_disabled_day.xml delete mode 100644 app/src/main/res/drawable/cookies_disabled_night.xml rename app/src/main/res/drawable/{copy_night.xml => copy.xml} (93%) delete mode 100644 app/src/main/res/drawable/copy_day.xml delete mode 100644 app/src/main/res/drawable/copy_enabled_day.xml delete mode 100644 app/src/main/res/drawable/copy_enabled_night.xml rename app/src/main/res/drawable/{custom_user_agent_enabled_day.xml => custom_user_agent_enabled.xml} (93%) rename app/src/main/res/drawable/{custom_user_agent_enabled_night.xml => custom_user_agent_ghosted.xml} (92%) delete mode 100644 app/src/main/res/drawable/custom_user_agent_ghosted_day.xml delete mode 100644 app/src/main/res/drawable/custom_user_agent_ghosted_night.xml rename app/src/main/res/drawable/{delete_day.xml => delete_enabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/delete_night.xml delete mode 100644 app/src/main/res/drawable/dom_storage_cleared_day.xml rename app/src/main/res/drawable/{dom_storage_disabled_day.xml => dom_storage_disabled.xml} (92%) rename app/src/main/res/drawable/{dom_storage_cleared_night.xml => dom_storage_ghosted.xml} (92%) delete mode 100644 app/src/main/res/drawable/dom_storage_ghosted_day.xml delete mode 100644 app/src/main/res/drawable/dom_storage_ghosted_night.xml rename app/src/main/res/drawable/{url_bar_background_dark_blue.xml => domain_settings_url_background.xml} (93%) rename app/src/main/res/drawable/{domains_day.xml => domains.xml} (93%) delete mode 100644 app/src/main/res/drawable/domains_night.xml rename app/src/main/res/drawable/{downloads_enabled_day.xml => download.xml} (90%) rename app/src/main/res/drawable/{download_with_external_app_disabled_night.xml => download_with_external_app_disabled.xml} (94%) rename app/src/main/res/drawable/{download_with_external_app_disabled_day.xml => download_with_external_app_enabled.xml} (94%) delete mode 100644 app/src/main/res/drawable/download_with_external_app_enabled_day.xml delete mode 100644 app/src/main/res/drawable/download_with_external_app_enabled_night.xml delete mode 100644 app/src/main/res/drawable/downloads_enabled_night.xml rename app/src/main/res/drawable/{edit_night.xml => edit.xml} (93%) delete mode 100644 app/src/main/res/drawable/edit_day.xml rename app/src/main/res/drawable/{font_size_day.xml => font_size.xml} (91%) delete mode 100644 app/src/main/res/drawable/font_size_night.xml delete mode 100644 app/src/main/res/drawable/form_data_cleared_day.xml rename app/src/main/res/drawable/{form_data_cleared_night.xml => form_data_disabled.xml} (92%) delete mode 100644 app/src/main/res/drawable/form_data_disabled_night.xml rename app/src/main/res/drawable/{full_screen_disabled_night.xml => full_screen_disabled.xml} (91%) rename app/src/main/res/drawable/{full_screen_disabled_day.xml => full_screen_enabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/full_screen_enabled_day.xml delete mode 100644 app/src/main/res/drawable/full_screen_enabled_night.xml rename app/src/main/res/drawable/{home_enabled_day.xml => home.xml} (90%) delete mode 100644 app/src/main/res/drawable/home_enabled_night.xml rename app/src/main/res/drawable/{images_options_night.xml => image.xml} (92%) rename app/src/main/res/drawable/{images_enabled_day.xml => images_disabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/images_disabled_day.xml rename app/src/main/res/drawable/{images_disabled_night.xml => images_enabled.xml} (92%) delete mode 100644 app/src/main/res/drawable/images_enabled_night.xml delete mode 100644 app/src/main/res/drawable/images_options_day.xml rename app/src/main/res/drawable/{incognito_mode_disabled_night.xml => incognito_mode_disabled.xml} (95%) rename app/src/main/res/drawable/{incognito_mode_disabled_day.xml => incognito_mode_enabled.xml} (95%) delete mode 100644 app/src/main/res/drawable/incognito_mode_enabled_day.xml delete mode 100644 app/src/main/res/drawable/incognito_mode_enabled_night.xml rename app/src/main/res/drawable/{lock_day.xml => lock.xml} (93%) delete mode 100644 app/src/main/res/drawable/lock_night.xml rename app/src/main/res/drawable/{modify_url_disabled_night.xml => modify_url_disabled.xml} (93%) rename app/src/main/res/drawable/{modify_url_disabled_day.xml => modify_url_enabled.xml} (94%) delete mode 100644 app/src/main/res/drawable/modify_url_enabled_day.xml delete mode 100644 app/src/main/res/drawable/modify_url_enabled_night.xml rename app/src/main/res/drawable/{more_disabled_night.xml => more_disabled.xml} (94%) rename app/src/main/res/drawable/{more_disabled_day.xml => more_enabled.xml} (94%) delete mode 100644 app/src/main/res/drawable/more_enabled_day.xml delete mode 100644 app/src/main/res/drawable/more_enabled_night.xml rename app/src/main/res/drawable/{move_down_enabled_night.xml => move_down_enabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/move_down_enabled_day.xml rename app/src/main/res/drawable/{move_to_folder_night.xml => move_to_folder.xml} (97%) rename app/src/main/res/drawable/{move_to_folder_day.xml => move_to_folder_blue.xml} (97%) delete mode 100644 app/src/main/res/drawable/move_to_folder_blue_day.xml delete mode 100644 app/src/main/res/drawable/move_to_folder_blue_night.xml rename app/src/main/res/drawable/{move_up_enabled_night.xml => move_up_enabled.xml} (91%) delete mode 100644 app/src/main/res/drawable/move_up_enabled_day.xml rename app/src/main/res/drawable/{proxy_enabled_day.xml => proxy_disabled.xml} (91%) rename app/src/main/res/drawable/{proxy_disabled_day.xml => proxy_enabled.xml} (92%) delete mode 100644 app/src/main/res/drawable/proxy_enabled_night.xml rename app/src/main/res/drawable/{proxy_disabled_night.xml => proxy_ghosted.xml} (91%) delete mode 100644 app/src/main/res/drawable/proxy_ghosted_day.xml delete mode 100644 app/src/main/res/drawable/proxy_ghosted_night.xml rename app/src/main/res/drawable/{refresh_disabled_night.xml => refresh_disabled.xml} (92%) rename app/src/main/res/drawable/{refresh_disabled_day.xml => refresh_enabled.xml} (93%) delete mode 100644 app/src/main/res/drawable/refresh_enabled_day.xml delete mode 100644 app/src/main/res/drawable/refresh_enabled_night.xml rename app/src/main/res/drawable/{save_night.xml => save.xml} (93%) delete mode 100644 app/src/main/res/drawable/save_day.xml rename app/src/main/res/drawable/{save_text_night.xml => save_text.xml} (93%) delete mode 100644 app/src/main/res/drawable/save_text_day.xml rename app/src/main/res/drawable/{search_enabled_day.xml => search.xml} (93%) rename app/src/main/res/drawable/{search_custom_url_enabled_day.xml => search_custom_enabled.xml} (94%) rename app/src/main/res/drawable/{search_custom_url_enabled_night.xml => search_custom_ghosted.xml} (93%) delete mode 100644 app/src/main/res/drawable/search_custom_url_ghosted_day.xml delete mode 100644 app/src/main/res/drawable/search_custom_url_ghosted_night.xml delete mode 100644 app/src/main/res/drawable/search_enabled_night.xml rename app/src/main/res/drawable/{select_all_night.xml => select_all.xml} (94%) delete mode 100644 app/src/main/res/drawable/select_all_day.xml rename app/src/main/res/drawable/{share_night.xml => share.xml} (95%) delete mode 100644 app/src/main/res/drawable/share_day.xml rename app/src/main/res/drawable/{social_media_enabled_day.xml => social_media_disabled.xml} (94%) rename app/src/main/res/drawable/{social_media_disabled_day.xml => social_media_enabled.xml} (95%) delete mode 100644 app/src/main/res/drawable/social_media_enabled_night.xml rename app/src/main/res/drawable/{social_media_disabled_night.xml => social_media_ghosted.xml} (94%) delete mode 100644 app/src/main/res/drawable/social_media_ghosted_day.xml delete mode 100644 app/src/main/res/drawable/social_media_ghosted_night.xml rename app/src/main/res/drawable/{sort_night.xml => sort.xml} (91%) delete mode 100644 app/src/main/res/drawable/sort_day.xml rename app/src/main/res/drawable/{sort_selected_day.xml => sort_selected.xml} (93%) delete mode 100644 app/src/main/res/drawable/sort_selected_night.xml rename app/src/main/res/drawable/{ssl_certificate_disabled_night.xml => ssl_certificate_disabled.xml} (95%) rename app/src/main/res/drawable/{ssl_certificate_disabled_day.xml => ssl_certificate_enabled.xml} (95%) delete mode 100644 app/src/main/res/drawable/ssl_certificate_enabled_day.xml delete mode 100644 app/src/main/res/drawable/ssl_certificate_enabled_night.xml rename app/src/main/res/drawable/{tab_disabled_night.xml => tab_disabled.xml} (91%) rename app/src/main/res/drawable/{tab_disabled_day.xml => tab_enabled.xml} (92%) delete mode 100644 app/src/main/res/drawable/tab_enabled_day.xml delete mode 100644 app/src/main/res/drawable/tab_enabled_night.xml delete mode 100644 app/src/main/res/drawable/url_bar_background_light_green.xml rename app/src/main/res/drawable/{user_agent_day.xml => user_agent.xml} (94%) delete mode 100644 app/src/main/res/drawable/user_agent_night.xml rename app/src/main/res/drawable/{webview_dark_theme_night.xml => webview_dark_theme.xml} (96%) rename app/src/main/res/drawable/{webview_dark_theme_day.xml => webview_light_theme.xml} (96%) delete mode 100644 app/src/main/res/drawable/webview_light_theme_day.xml delete mode 100644 app/src/main/res/drawable/webview_light_theme_night.xml rename app/src/main/res/drawable/{wide_viewport_disabled_night.xml => wide_viewport_disabled.xml} (92%) rename app/src/main/res/drawable/{wide_viewport_disabled_day.xml => wide_viewport_enabled.xml} (93%) delete mode 100644 app/src/main/res/drawable/wide_viewport_enabled_day.xml delete mode 100644 app/src/main/res/drawable/wide_viewport_enabled_night.xml diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java index 7574a22c..cea440a4 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java @@ -24,7 +24,6 @@ import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.Configuration; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; @@ -1107,45 +1106,34 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma // bookmarksListView is 0 indexed. int lastBookmarkDatabaseId = (int) bookmarksListView.getItemIdAtPosition(bookmarksListView.getCount() - 1); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Update the move bookmark up `MenuItem`. + // Update the move bookmark up menu item. if (selectedBookmarkDatabaseId == firstBookmarkDatabaseId) { // The selected bookmark is in the first position. - // Disable the move bookmark up `MenuItem`. + // Disable the move bookmark up menu item. moveBookmarkUpMenuItem.setEnabled(false); - // Set the move bookmark up icon to be ghosted. + // Set the icon. moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_disabled); } else { // The selected bookmark is not in the first position. // Enable the move bookmark up menu item. moveBookmarkUpMenuItem.setEnabled(true); // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled_night); - } else { - moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled_day); - } + moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled); } - // Update the move bookmark down `MenuItem`. + // Update the move bookmark down menu item. if (selectedBookmarkDatabaseId == lastBookmarkDatabaseId) { // The selected bookmark is in the last position. - // Disable the move bookmark down `MenuItem`. + // Disable the move bookmark down menu item. moveBookmarkDownMenuItem.setEnabled(false); - // Set the move bookmark down icon to be ghosted. + // Set the icon. moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_disabled); } else { // The selected bookmark is not in the last position. - // Enable the move bookmark down `MenuItem`. + // Enable the move bookmark down menu item. moveBookmarkDownMenuItem.setEnabled(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled_night); - } else { - moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled_day); - } + // Set the icon. + moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled); } } diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java index 86ebfbaa..91afa6d6 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java @@ -613,19 +613,12 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements // Inflate the menu. getMenuInflater().inflate(R.menu.bookmarks_databaseview_options_menu, menu); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - // Get a handle for the sort menu item. MenuItem sortMenuItem = menu.findItem(R.id.sort); // Change the sort menu item icon if the listview is sorted by display order, which restores the state after a restart. if (sortByDisplayOrder) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - sortMenuItem.setIcon(R.drawable.sort_selected_day); - } else { - sortMenuItem.setIcon(R.drawable.sort_selected_night); - } + sortMenuItem.setIcon(R.drawable.sort_selected); } // Success. @@ -648,27 +641,16 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements // Get a handle for the bookmarks list view. ListView bookmarksListView = findViewById(R.id.bookmarks_databaseview_listview); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - // Update the icon and display a snackbar. if (sortByDisplayOrder) { // Sort by display order. - // Update the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - menuItem.setIcon(R.drawable.sort_selected_day); - } else { - menuItem.setIcon(R.drawable.sort_selected_night); - } + // Update the icon. + menuItem.setIcon(R.drawable.sort_selected); // Display a Snackbar indicating the current sort type. Snackbar.make(bookmarksListView, R.string.sorted_by_display_order, Snackbar.LENGTH_SHORT).show(); } else { // Sort by database id. - // Update the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - menuItem.setIcon(R.drawable.sort_day); - } else { - menuItem.setIcon(R.drawable.sort_night); - } + // Update the icon. + menuItem.setIcon(R.drawable.sort); // Display a Snackbar indicating the current sort type. Snackbar.make(bookmarksListView, R.string.sorted_by_database_id, Snackbar.LENGTH_SHORT).show(); diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java index 9de4fb8e..2ef534f1 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java @@ -23,7 +23,6 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.Configuration; import android.content.res.Resources; import android.database.Cursor; import android.os.Bundle; @@ -529,15 +528,8 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo // Enable the options delete menu item. deleteMenuItem.setEnabled(true); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the delete menu item icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - deleteMenuItem.setIcon(R.drawable.delete_night); - } else { - deleteMenuItem.setIcon(R.drawable.delete_day); - } + // Set the delete menu item icon. + deleteMenuItem.setIcon(R.drawable.delete_enabled); } else { // The device in in one-paned mode. // Display the domain settings fragment. fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainSettingsFragment).commit(); @@ -564,15 +556,8 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo // Enable the delete menu item. deleteMenuItem.setEnabled(true); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the delete menu item icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - deleteMenuItem.setIcon(R.drawable.delete_night); - } else { - deleteMenuItem.setIcon(R.drawable.delete_day); - } + // Set the delete menu item icon. + deleteMenuItem.setIcon(R.drawable.delete_enabled); } else { // Single-paned mode. // Show the delete menu item. deleteMenuItem.setVisible(true); @@ -925,15 +910,8 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo // Enable the delete options menu items. deleteMenuItem.setEnabled(true); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the delete icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - deleteMenuItem.setIcon(R.drawable.delete_night); - } else { - deleteMenuItem.setIcon(R.drawable.delete_day); - } + // Set the delete icon. + deleteMenuItem.setIcon(R.drawable.delete_enabled); } else if (twoPanedMode) { // Two-paned mode is enabled but there are no domains. // Disable the options `MenuItems`. deleteMenuItem.setEnabled(false); diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java index e086503d..6c605828 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java @@ -441,7 +441,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook Snackbar.make(currentWebView, getString(R.string.file_saved) + " " + fileNameString, Snackbar.LENGTH_SHORT).show(); } catch (Exception exception) { // Display a snackbar with the exception. - Snackbar.make(currentWebView, getString(R.string.error_saving_file) + " " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show(); + Snackbar.make(currentWebView, getString(R.string.error_saving_file) + " " + exception, Snackbar.LENGTH_INDEFINITE).show(); } finally { // Delete the temporary MHT file. //noinspection ResultOfMethodCallIgnored @@ -454,7 +454,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook }); } catch (IOException ioException) { // Display a snackbar with the IO exception. - Snackbar.make(currentWebView, getString(R.string.error_saving_file) + " " + ioException.toString(), Snackbar.LENGTH_INDEFINITE).show(); + Snackbar.make(currentWebView, getString(R.string.error_saving_file) + " " + ioException, Snackbar.LENGTH_INDEFINITE).show(); } } } @@ -999,17 +999,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Set the title. optionsRefreshMenuItem.setTitle(R.string.stop); - // Set the icon if it is displayed in the app bar. + // Set the icon if it is displayed in the app bar. Once the minimum API is >= 26, the blue and black icons can be combined with a tint list. if (displayAdditionalAppBarIcons) { - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the icon according to the current theme status. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - optionsRefreshMenuItem.setIcon(R.drawable.close_blue_day); - } else { - optionsRefreshMenuItem.setIcon(R.drawable.close_blue_night); - } + optionsRefreshMenuItem.setIcon(R.drawable.close_blue); } } @@ -2838,21 +2830,21 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Initialize the formatted URL string. String url = ""; - // Check to see if `unformattedUrlString` is a valid URL. Otherwise, convert it into a search. + // Check to see if the unformatted URL string is a valid URL. Otherwise, convert it into a search. if (unformattedUrlString.startsWith("content://")) { // This is a Content URL. // Load the entire content URL. url = unformattedUrlString; } else if (Patterns.WEB_URL.matcher(unformattedUrlString).matches() || unformattedUrlString.startsWith("http://") || unformattedUrlString.startsWith("https://") || unformattedUrlString.startsWith("file://")) { // This is a standard URL. // Add `https://` at the beginning if there is no protocol. Otherwise the app will segfault. - if (!unformattedUrlString.startsWith("http") && !unformattedUrlString.startsWith("file://") && !unformattedUrlString.startsWith("content://")) { + if (!unformattedUrlString.startsWith("http") && !unformattedUrlString.startsWith("file://")) { unformattedUrlString = "https://" + unformattedUrlString; } - // Initialize `unformattedUrl`. + // Initialize the unformatted URL. URL unformattedUrl = null; - // Convert `unformattedUrlString` to a `URL`, then to a `URI`, and then back to a `String`, which sanitizes the input and adds in any missing components. + // Convert the unformatted URL string to a URL, then to a URI, and then back to a string, which sanitizes the input and adds in any missing components. try { unformattedUrl = new URL(unformattedUrlString); } catch (MalformedURLException e) { @@ -3026,7 +3018,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook currentWebView.loadUrl(temporaryMhtFile.toString()); } catch (Exception exception) { // Display a snackbar. - Snackbar.make(currentWebView, getString(R.string.error) + " " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show(); + Snackbar.make(currentWebView, getString(R.string.error) + " " + exception, Snackbar.LENGTH_INDEFINITE).show(); } } else { // Let the WebView handle opening of the file. // Open the file. @@ -4003,15 +3995,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook break; } - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - // Set a background on the URL relative layout to indicate that custom domain settings are being used. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_light_green, null)); - } else { - urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_dark_blue, null)); - } + urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.domain_settings_url_background, null)); } else { // The new URL does not have custom domain settings. Load the defaults. // Store the values from the shared preferences. nestedScrollWebView.getSettings().setJavaScriptEnabled(sharedPreferences.getBoolean("javascript", false)); @@ -4292,35 +4277,20 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook optionsPrivacyMenuItem.setIcon(R.drawable.privacy_mode); } - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - // Update the cookies icon. - if (currentWebView.getAcceptCookies()) { // Cookies are enabled. + if (currentWebView.getAcceptCookies()) { optionsCookiesMenuItem.setIcon(R.drawable.cookies_enabled); - } else { // Cookies are disabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - optionsCookiesMenuItem.setIcon(R.drawable.cookies_disabled_day); - } else { - optionsCookiesMenuItem.setIcon(R.drawable.cookies_disabled_night); - } + } else { + optionsCookiesMenuItem.setIcon(R.drawable.cookies_disabled); } // Update the refresh icon. if (optionsRefreshMenuItem.getTitle() == getString(R.string.refresh)) { // The refresh icon is displayed. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_day); - } else { - optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_night); - } + // Set the icon. Once the minimum API is >= 26, the blue and black icons can be combined with a tint list. + optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled); } else { // The stop icon is displayed. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - optionsRefreshMenuItem.setIcon(R.drawable.close_blue_day); - } else { - optionsRefreshMenuItem.setIcon(R.drawable.close_blue_night); - } + // Set the icon. Once the minimum API is >= 26, the blue and black icons can be combined with a tint list. + optionsRefreshMenuItem.setIcon(R.drawable.close_blue); } // `invalidateOptionsMenu()` calls `onPrepareOptionsMenu()` and redraws the icons in the app bar. @@ -5014,16 +4984,10 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Set the background to indicate the domain settings status. if (currentWebView.getDomainSettingsApplied()) { - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set a green background on the URL relative layout to indicate that custom domain settings are being used. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_light_green, null)); - } else { - urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_dark_blue, null)); - } + // Set a background on the URL relative layout to indicate that custom domain settings are being used. + urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.domain_settings_url_background, null)); } else { + // Remove any background on the URL relative layout. urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.color.transparent, null)); } } else { // The fragment has not been populated. Try again in 100 milliseconds. @@ -5977,17 +5941,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // Get the app bar and theme preferences. boolean displayAdditionalAppBarIcons = sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false); - // If the icon is displayed in the AppBar, set it according to the theme. + // Set the icon if it is displayed in the AppBar. Once the minimum API is >= 26, the blue and black icons can be combined with a tint list. if (displayAdditionalAppBarIcons) { - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the stop icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - optionsRefreshMenuItem.setIcon(R.drawable.close_blue_day); - } else { - optionsRefreshMenuItem.setIcon(R.drawable.close_blue_night); - } + optionsRefreshMenuItem.setIcon(R.drawable.close_blue); } } } @@ -6009,15 +5965,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook // If the icon is displayed in the app bar, reset it according to the theme. if (displayAdditionalAppBarIcons) { - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_day); - } else { - optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_night); - } + // Set the icon. + optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled); } } @@ -6126,7 +6075,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook } } - // Handle SSL Certificate errors. + // Handle SSL Certificate errors. Suppress the lint warning that ignoring the error might be dangerous. + @SuppressLint("WebViewClientOnReceivedSslError") @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { // Get the current website SSL certificate. diff --git a/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt b/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt index 294e6055..aad20f89 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt @@ -20,7 +20,6 @@ package com.stoutner.privacybrowser.adapters import android.content.Context -import android.content.res.Configuration import android.net.Uri import android.text.SpannableStringBuilder import android.text.Spanned @@ -198,21 +197,9 @@ class PinnedMismatchPagerAdapter(private val context: Context, private val layou } } - // Define the color spans. - val blueColorSpan: ForegroundColorSpan - val redColorSpan: ForegroundColorSpan - - // Get the current theme status. - val currentThemeStatus = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - - // Set the color spans according to the theme. The deprecated `resources` must be used until the minimum API >= 23. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - blueColorSpan = ForegroundColorSpan(context.getColor(R.color.blue_700)) - redColorSpan = ForegroundColorSpan(context.getColor(R.color.red_a700)) - } else { - blueColorSpan = ForegroundColorSpan(context.getColor(R.color.violet_700)) - redColorSpan = ForegroundColorSpan(context.getColor(R.color.red_900)) - } + // Create the color spans. + val blueColorSpan = ForegroundColorSpan(context.getColor(R.color.blue_text)) + val redColorSpan = ForegroundColorSpan(context.getColor(R.color.red_text)) // Set the domain name to be blue. domainNameStringBuilder.setSpan(blueColorSpan, domainNameLabel.length, domainNameStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.kt index 8f4f5aab..8ac83313 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.kt @@ -35,7 +35,7 @@ class AboutViewSourceDialog : DialogFragment() { val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.aboutBlueIcon) + dialogBuilder.setIcon(R.drawable.about_blue) // Set the title. dialogBuilder.setTitle(R.string.about_view_source) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/AddDomainDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/AddDomainDialog.kt index ac65aa5a..c67e23b0 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/AddDomainDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/AddDomainDialog.kt @@ -90,8 +90,8 @@ class AddDomainDialog : DialogFragment() { // Use an alert dialog builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.domainsBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.domains) // Set the title. dialogBuilder.setTitle(R.string.add_domain) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt index a6ab28dd..a8167e3e 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt @@ -84,7 +84,7 @@ class FontSizeDialog : DialogFragment() { val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.fontSizeBlueIcon) + dialogBuilder.setIcon(R.drawable.font_size) // Set the title. dialogBuilder.setTitle(R.string.font_size) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.kt index c8e84e6f..d7fe8f9b 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.kt @@ -21,7 +21,6 @@ package com.stoutner.privacybrowser.dialogs import android.app.Dialog import android.content.DialogInterface -import android.content.res.Configuration import android.os.Bundle import android.text.SpannableStringBuilder import android.text.Spanned @@ -106,8 +105,8 @@ class HttpAuthenticationDialog : DialogFragment() { // Use an alert dialog builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.lockBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.lock) // Set the title. dialogBuilder.setTitle(R.string.http_authentication) @@ -168,17 +167,8 @@ class HttpAuthenticationDialog : DialogFragment() { val hostLabel = getString(R.string.host) + " " val hostStringBuilder = SpannableStringBuilder(hostLabel + httpAuthHost) - // Get the current theme status. - val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - - // Set the blue color span according to the theme. The deprecated `getColor()` must be used until API >= 23. - val blueColorSpan = if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - @Suppress("DEPRECATION") - ForegroundColorSpan(resources.getColor(R.color.blue_700)) - } else { - @Suppress("DEPRECATION") - ForegroundColorSpan(resources.getColor(R.color.violet_700)) - } + // Set the blue color span. + val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text)) // Setup the span to display the host name in blue. `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. hostStringBuilder.setSpan(blueColorSpan, hostLabel.length, hostStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt index 0f722cdc..643e79cd 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt @@ -107,8 +107,8 @@ class MoveToFolderDialog : DialogFragment() { // Use an alert dialog builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.moveToFolderBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.move_to_folder_blue) // Set the title. dialogBuilder.setTitle(R.string.move_to_folder) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/OpenDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/OpenDialog.kt index 043bdeb4..6e1db124 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/OpenDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/OpenDialog.kt @@ -67,8 +67,8 @@ class OpenDialog : DialogFragment() { // Use an alert dialog builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.proxyBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.proxy_enabled) // Set the title. dialogBuilder.setTitle(R.string.open) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedMismatchDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedMismatchDialog.kt index bef07390..2d1cdd7d 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedMismatchDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedMismatchDialog.kt @@ -115,8 +115,8 @@ class PinnedMismatchDialog : DialogFragment() { // Set the favorite icon as the dialog icon if it exists. if (favoriteIconBitmap.sameAs(defaultFavoriteIconBitmap)) { // There is no website favorite icon. - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled) } else { // There is a favorite icon. // Create a drawable version of the favorite icon. val favoriteIconDrawable: Drawable = BitmapDrawable(resources, favoriteIconBitmap) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ProxyNotInstalledDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ProxyNotInstalledDialog.kt index f2f2b25c..568adbc4 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ProxyNotInstalledDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ProxyNotInstalledDialog.kt @@ -62,8 +62,8 @@ class ProxyNotInstalledDialog : DialogFragment() { // Use a builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.proxyBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.proxy_enabled) // Set the title and the message according to the proxy mode. when (proxyMode) { diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt index 1aa31dd0..77cd1c1a 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt @@ -104,8 +104,8 @@ class SaveDialog : DialogFragment() { // Set the title. dialogBuilder.setTitle(R.string.save_url) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.copyBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.download) // Set the view. dialogBuilder.setView(R.layout.save_dialog) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt index 0f9af897..d146de53 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt @@ -22,7 +22,6 @@ package com.stoutner.privacybrowser.dialogs import android.app.Activity import android.app.Dialog import android.content.DialogInterface -import android.content.res.Configuration import android.net.Uri import android.net.http.SslError import android.os.AsyncTask @@ -136,11 +135,8 @@ class SslCertificateErrorDialog : DialogFragment() { // Use an alert dialog builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Get the current theme status. - val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled) // Set the title. dialogBuilder.setTitle(R.string.ssl_certificate_error) @@ -230,21 +226,8 @@ class SslCertificateErrorDialog : DialogFragment() { val endDateStringBuilder = SpannableStringBuilder(endDateLabel + endDate) // Define the color spans. - val blueColorSpan: ForegroundColorSpan - val redColorSpan: ForegroundColorSpan - - // Set the color spans according to the theme. The deprecated `getColor()` must be used until the minimum API >= 23. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - @Suppress("DEPRECATION") - blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.blue_700)) - @Suppress("DEPRECATION") - redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_a700)) - } else { - @Suppress("DEPRECATION") - blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.violet_700)) - @Suppress("DEPRECATION") - redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_900)) - } + val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text)) + val redColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.red_text)) // Setup the spans to display the certificate information in blue. `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. urlStringBuilder.setSpan(blueColorSpan, urlLabel.length, urlStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) @@ -272,14 +255,8 @@ class SslCertificateErrorDialog : DialogFragment() { } SslError.SSL_UNTRUSTED -> { - // Change the issued by text view text to red. The deprecated `getColor()` must be used until the minimum API >= 23. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - @Suppress("DEPRECATION") - issuedByTextView.setTextColor(resources.getColor(R.color.red_a700)) - } else { - @Suppress("DEPRECATION") - issuedByTextView.setTextColor(resources.getColor(R.color.red_900)) - } + // Change the issued by text view text to red. + issuedByTextView.setTextColor(requireContext().getColor(R.color.red_text)) // Change the issued by span color to red. issuedByCNameStringBuilder.setSpan(redColorSpan, cNameLabel.length, issuedByCNameStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) @@ -291,14 +268,8 @@ class SslCertificateErrorDialog : DialogFragment() { } SslError.SSL_DATE_INVALID -> { - // Change the valid dates text view text to red. The deprecated `getColor()` must be used until the minimum API >= 23. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - @Suppress("DEPRECATION") - validDatesTextView.setTextColor(resources.getColor(R.color.red_a700)) - } else { - @Suppress("DEPRECATION") - validDatesTextView.setTextColor(resources.getColor(R.color.red_900)) - } + // Change the valid dates text view text to red. + validDatesTextView.setTextColor(requireContext().getColor(R.color.red_text)) // Change the date span colors to red. startDateStringBuilder.setSpan(redColorSpan, startDateLabel.length, startDateStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) @@ -390,20 +361,8 @@ class SslCertificateErrorDialog : DialogFragment() { // Create a spannable string builder. val ipAddressesStringBuilder = SpannableStringBuilder(ipAddressesLabel + ipAddresses) - // Create a blue foreground color span. - val blueColorSpan: ForegroundColorSpan - - // Get the current theme status. - val currentThemeStatus = activity.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - - // Set the blue color span according to the theme. The deprecated `getColor()` must be used until the minimum API >= 23. - blueColorSpan = if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - @Suppress("DEPRECATION") - ForegroundColorSpan(activity.resources.getColor(R.color.blue_700)) - } else { - @Suppress("DEPRECATION") - ForegroundColorSpan(activity.resources.getColor(R.color.violet_500)) - } + // Create a blue color span according to the theme. + val blueColorSpan = ForegroundColorSpan(activity.getColor(R.color.blue_text)) // Set the string builder to display the certificate information in blue. `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction. ipAddressesStringBuilder.setSpan(blueColorSpan, ipAddressesLabel.length, ipAddressesStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt index e5e97bcf..f44710f8 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt @@ -55,8 +55,8 @@ class UntrustedSslCertificateDialog : DialogFragment() { // Use a builder to create the alert dialog. val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog) - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled) // Set the title. dialogBuilder.setTitle(R.string.ssl_certificate_error) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.kt index 2c80301b..54e997af 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.kt @@ -96,8 +96,8 @@ class ViewRequestDialog : DialogFragment() { // Get the current theme status. val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - // Set the icon according to the theme. - dialogBuilder.setIconAttribute(R.attr.blockAdsBlueIcon) + // Set the icon. + dialogBuilder.setIcon(R.drawable.block_ads_enabled) // Set the title. dialogBuilder.setTitle(resources.getString(R.string.request_details) + " - " + id) diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt index 793c50bc..0a79f806 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt @@ -20,7 +20,6 @@ package com.stoutner.privacybrowser.dialogs import android.app.Dialog -import android.content.res.Configuration import android.graphics.Bitmap import android.graphics.BitmapFactory import android.graphics.drawable.BitmapDrawable @@ -251,24 +250,8 @@ class ViewSslCertificateDialog : DialogFragment() { val endDateStringBuilder = SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(endDate)) // Define the color spans. - val blueColorSpan: ForegroundColorSpan - val redColorSpan: ForegroundColorSpan - - // Get the current theme status. - val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK - - // Set the color spans according to the theme. The deprecated `getColor()` must be used until the minimum API >= 23. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - @Suppress("DEPRECATION") - blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.blue_700)) - @Suppress("DEPRECATION") - redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_a700)) - } else { - @Suppress("DEPRECATION") - blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.violet_700)) - @Suppress("DEPRECATION") - redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_900)) - } + val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text)) + val redColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.red_text)) // Format the domain string and issued to CName colors. if (domainString == issuedToCName) { // The domain and issued to CName match. diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java index 71d6f484..1ce0e3cc 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java @@ -299,18 +299,9 @@ public class DomainSettingsFragment extends Fragment { savedSslEndDateStringBuilder = new SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(savedSslEndDate)); } - // Create the foreground color spans. - final ForegroundColorSpan blueColorSpan; - final ForegroundColorSpan redColorSpan; - - // Set the color spans according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - blueColorSpan = new ForegroundColorSpan(context.getColor(R.color.blue_700)); - redColorSpan = new ForegroundColorSpan(context.getColor(R.color.red_a700)); - } else { - blueColorSpan = new ForegroundColorSpan(context.getColor(R.color.violet_700)); - redColorSpan = new ForegroundColorSpan(context.getColor(R.color.red_900)); - } + // Create the color spans. + final ForegroundColorSpan blueColorSpan = new ForegroundColorSpan(context.getColor(R.color.blue_text)); + final ForegroundColorSpan redColorSpan = new ForegroundColorSpan(context.getColor(R.color.red_text)); // Set the domain name from the the database cursor. domainNameEditText.setText(domainNameString); @@ -379,6 +370,7 @@ public class DomainSettingsFragment extends Fragment { } // Set the cookies switch status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (cookiesInt == 1) { // Cookies are enabled. // Turn the switch on. cookiesSwitch.setChecked(true); @@ -389,12 +381,8 @@ public class DomainSettingsFragment extends Fragment { // Turn the switch off cookiesSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_day, null)); - } else { - cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_night, null)); - } + // Set the icon. + cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled, null)); } // Only enable DOM storage if JavaScript is enabled. @@ -403,6 +391,7 @@ public class DomainSettingsFragment extends Fragment { domStorageSwitch.setEnabled(true); // Set the DOM storage status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (domStorageInt == 1) { // Both JavaScript and DOM storage are enabled. domStorageSwitch.setChecked(true); domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null)); @@ -410,26 +399,18 @@ public class DomainSettingsFragment extends Fragment { // Set the DOM storage switch to off. domStorageSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_night, null)); - } else { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_day, null)); - } + // Set the icon. + domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled, null)); } } else { // JavaScript is disabled. - // Disable the DOM storage `Switch`. + // Disable the DOM storage switch. domStorageSwitch.setEnabled(false); // Set the checked status of DOM storage. domStorageSwitch.setChecked(domStorageInt == 1); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_night, null)); - } else { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_day, null)); - } + // Set the icon. + domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted, null)); } // Set the form data visibility. Form data can be removed once the minimum API >= 26. @@ -448,82 +429,58 @@ public class DomainSettingsFragment extends Fragment { // Turn the form data switch to off. formDataSwitch.setChecked(false); - // Set the icon according to the theme. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_night, null)); - } else { - formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_day, null)); - } + // Set the icon. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. + formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled, null)); } } // Set the EasyList status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (easyListInt == 1) { // EasyList is on. // Turn the switch on. easyListSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null)); - } else { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null)); - } + // Set the icon. + easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null)); } else { // EasyList is off. // Turn the switch off. easyListSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null)); - } else { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null)); - } + // Set the icon. + easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null)); } // Set the EasyPrivacy status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (easyPrivacyInt == 1) { // EasyPrivacy is on. // Turn the switch on. easyPrivacySwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null)); - } else { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null)); - } + // Set the icon. + easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null)); } else { // EasyPrivacy is off. // Turn the switch off. easyPrivacySwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null)); - } else { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null)); - } + // Set the icon. + easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null)); } // Set the Fanboy's Annoyance List status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (fanboysAnnoyanceListInt == 1) { // Fanboy's Annoyance List is on. // Turn the switch on. fanboysAnnoyanceListSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null)); - } else { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null)); - } + // Set the icon. + fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null)); } else { // Fanboy's Annoyance List is off. // Turn the switch off. fanboysAnnoyanceListSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null)); - } else { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null)); - } + // Set the icon. + fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null)); } // Only enable Fanboy's Social Blocking List if Fanboy's Annoyance List is off. @@ -532,26 +489,19 @@ public class DomainSettingsFragment extends Fragment { fanboysSocialBlockingListSwitch.setEnabled(true); // Enable Fanboy's Social Blocking List. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (fanboysSocialBlockingListInt == 1) { // Fanboy's Social Blocking List is on. // Turn on Fanboy's Social Blocking List switch. fanboysSocialBlockingListSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null)); - } + // Set the icon. + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null)); } else { // Fanboy's Social Blocking List is off. // Turn off Fanboy's Social Blocking List switch. fanboysSocialBlockingListSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null)); - } + // Set the icon. + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null)); } } else { // Fanboy's Annoyance List is on. // Disable Fanboy's Social Blocking List switch. @@ -560,81 +510,56 @@ public class DomainSettingsFragment extends Fragment { // Set the status of Fanboy's Social Blocking List. fanboysSocialBlockingListSwitch.setChecked(fanboysSocialBlockingListInt == 1); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_day, null)); - } + // Set the icon. + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted, null)); } // Set the UltraList status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (ultraListInt == 1) { // UltraList is on. // Turn the switch on. ultraListSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null)); - } else { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null)); - } + // Set the icon. + ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null)); } else { // UltraList is off. // Turn the switch off. ultraListSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null)); - } else { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null)); - } + // Set the icon. + ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null)); } // Set the UltraPrivacy status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (ultraPrivacyInt == 1) { // UltraPrivacy is on. // Turn the switch on. ultraPrivacySwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null)); - } else { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null)); - } + // Set the icon. + ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null)); } else { // EasyPrivacy is off. // Turn the switch off. ultraPrivacySwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null)); - } else { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null)); - } + // Set the icon. + ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null)); } // Set the third-party resource blocking status. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. if (blockAllThirdPartyRequestsInt == 1) { // Blocking all third-party requests is on. // Turn the switch on. blockAllThirdPartyRequestsSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_night, null)); - } else { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_day, null)); - } + // Set the icon. + blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled, null)); } else { // Blocking all third-party requests is off. // Turn the switch off. blockAllThirdPartyRequestsSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_night, null)); - } else { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_day, null)); - } + // Set the icon. + blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled, null)); } // Inflated a WebView to get the default user agent. @@ -761,55 +686,40 @@ public class DomainSettingsFragment extends Fragment { swipeToRefreshTextView.setText(swipeToRefreshArrayAdapter.getItem(DomainsDatabaseHelper.DISABLED)); } - // Set the swipe to refresh icon and TextView settings. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Set the swipe to refresh icon and text view settings. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. switch (swipeToRefreshInt) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: if (defaultSwipeToRefresh) { // Swipe to refresh is enabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null)); - } - } else { // Swipe to refresh is disabled by default - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null)); - } + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null)); + } else { + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null)); } - // Show the swipe to refresh TextView. + // Show the swipe to refresh text view. swipeToRefreshTextView.setVisibility(View.VISIBLE); break; case DomainsDatabaseHelper.ENABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null)); - } + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null)); - // Hide the swipe to refresh TextView.` + // Hide the swipe to refresh text view. swipeToRefreshTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DISABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null)); - } + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null)); - // Hide the swipe to refresh TextView. + // Hide the swipe to refresh text view. swipeToRefreshTextView.setVisibility(View.GONE); break; } - // Open the swipe to refresh spinner when the TextView is clicked. + // Open the swipe to refresh spinner when the text view is clicked. swipeToRefreshTextView.setOnClickListener((View v) -> { // Open the swipe to refresh spinner. swipeToRefreshSpinner.performClick(); @@ -851,6 +761,7 @@ public class DomainSettingsFragment extends Fragment { } // Set the WebView theme icon and text visibility. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. switch (webViewThemeInt) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: // The domain WebView theme is system default. // Set the icon according to the app WebView theme. @@ -858,29 +769,22 @@ public class DomainSettingsFragment extends Fragment { case DomainsDatabaseHelper.SYSTEM_DEFAULT: // The default WebView theme is system default. // Set the icon according to the app theme. if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - // Set the light mode icon. - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null)); + // Set the light theme icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null)); } else { // Set the dark theme icon. - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null)); + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null)); } break; case DomainsDatabaseHelper.LIGHT_THEME: // the default WebView theme is light. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null)); break; case DomainsDatabaseHelper.DARK_THEME: // the default WebView theme is dark. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null)); } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null)); break; } @@ -889,24 +793,16 @@ public class DomainSettingsFragment extends Fragment { break; case DomainsDatabaseHelper.LIGHT_THEME: // The domain WebView theme is light. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null)); // Hide the WebView theme text view. webViewThemeTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DARK_THEME: // The domain WebView theme is dark. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null)); // Hide the WebView theme text view. webViewThemeTextView.setVisibility(View.GONE); @@ -930,21 +826,14 @@ public class DomainSettingsFragment extends Fragment { } // Set the wide viewport icon and text view settings. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. switch (wideViewportInt) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: + // Set the icon. if (defaultWideViewport) { // Wide viewport enabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null)); - } + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null)); } else { // Wide viewport disabled by default. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null)); - } + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null)); } // Show the wide viewport text view. @@ -953,23 +842,15 @@ public class DomainSettingsFragment extends Fragment { case DomainsDatabaseHelper.ENABLED: // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null)); - } + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null)); // Hide the wide viewport text view. wideViewportTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DISABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null)); - } + // Set the icon. + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null)); // Hide the wide viewport text view. wideViewportTextView.setVisibility(View.GONE); @@ -993,22 +874,15 @@ public class DomainSettingsFragment extends Fragment { } // Set the display website images icon and text view settings. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. switch (displayImagesInt) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: if (defaultDisplayWebpageImages) { // Display webpage images enabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null)); } else { // Display webpage images disabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null)); } // Show the display images text view. @@ -1016,24 +890,16 @@ public class DomainSettingsFragment extends Fragment { break; case DomainsDatabaseHelper.ENABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null)); // Hide the display images text view. displayImagesTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DISABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null)); // Hide the display images text view. displayImagesTextView.setVisibility(View.GONE); @@ -1048,25 +914,18 @@ public class DomainSettingsFragment extends Fragment { // Set the pinned SSL certificate icon. if (pinnedSslCertificateInt == 1) { // Pinned SSL certificate is enabled. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. // Check the switch. pinnedSslCertificateSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null)); - } else { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null)); - } + // Set the icon. + pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null)); } else { // Pinned SSL certificate is disabled. // Uncheck the switch. pinnedSslCertificateSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null)); - } else { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null)); - } + // Set the icon. + pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null)); } // Store the current date. @@ -1235,25 +1094,18 @@ public class DomainSettingsFragment extends Fragment { // Set the pinned IP addresses icon. if (pinnedIpAddressesInt == 1) { // Pinned IP addresses is enabled. Once the minimum API >= 21 a selector can be sued as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. // Check the switch. pinnedIpAddressesSwitch.setChecked(true); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null)); - } else { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null)); - } + // Set the icon. + pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null)); } else { // Pinned IP Addresses is disabled. // Uncheck the switch. pinnedIpAddressesSwitch.setChecked(false); - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null)); - } else { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null)); - } + // Set the icon. + pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null)); } // Populate the saved and current IP addresses. @@ -1317,41 +1169,28 @@ public class DomainSettingsFragment extends Fragment { if (domStorageSwitch.isChecked()) { // DOM storage is enabled. domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null)); } else { // DOM storage is disabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_night, null)); - } else { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_day, null)); - } + // Set the icon. + domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled, null)); } } else { // JavaScript is disabled. // Update the JavaScript icon. javaScriptImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.privacy_mode, null)); - // Disable the DOM storage `Switch`. + // Disable the DOM storage switch. domStorageSwitch.setEnabled(false); - // Set the DOM storage icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_night, null)); - } else { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_day, null)); - } + // Set the DOM storage icon. + domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted, null)); } }); // Set the cookies switch listener. cookiesSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { - if (isChecked) { // Cookies are enabled. - // Update the cookies icon. + // Update the cookies icon. + if (isChecked) { cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_enabled, null)); - } else { // Cookies are disabled. - // Update the cookies icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_day, null)); - } else { - cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_night, null)); - } + } else { + cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled, null)); } }); @@ -1361,12 +1200,8 @@ public class DomainSettingsFragment extends Fragment { if (isChecked) { domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null)); } else { - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_night, null)); - } else { - domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_day, null)); - } + // Set the icon. + domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled, null)); } }); @@ -1377,12 +1212,8 @@ public class DomainSettingsFragment extends Fragment { if (isChecked) { formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_enabled, null)); } else { - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_night, null)); - } else { - formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_day, null)); - } + // Set the icon. + formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled, null)); } }); } @@ -1390,20 +1221,10 @@ public class DomainSettingsFragment extends Fragment { // Set the EasyList switch listener. easyListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. - if (isChecked) { // EasyList is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null)); - } else { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null)); - } - } else { // EasyList is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null)); - } else { - easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null)); - } + if (isChecked) { + easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null)); + } else { + easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null)); } }); @@ -1411,19 +1232,10 @@ public class DomainSettingsFragment extends Fragment { easyPrivacySwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. if (isChecked) { // EasyPrivacy is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null)); - } else { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null)); - } - } else { // EasyPrivacy is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null)); - } else { - easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null)); - } + // Set the icon. + easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null)); + } else { + easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null)); } }); @@ -1431,130 +1243,67 @@ public class DomainSettingsFragment extends Fragment { fanboysAnnoyanceListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon and Fanboy's Social Blocking List. if (isChecked) { // Fanboy's Annoyance List is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null)); - } else { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null)); - } + // Set the icon. + fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null)); // Disable the Fanboy's Social Blocking List switch. fanboysSocialBlockingListSwitch.setEnabled(false); - // Update the Fanboy's Social Blocking List icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_day, null)); - } + // Update the Fanboy's Social Blocking List icon. + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted, null)); } else { // Fanboy's Annoyance List is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null)); - } else { - fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null)); - } + // Set the icon. + fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null)); // Enable the Fanboy's Social Blocking List switch. fanboysSocialBlockingListSwitch.setEnabled(true); // Update the Fanboy's Social Blocking List icon. - if (fanboysSocialBlockingListSwitch.isChecked()) { // Fanboy's Social Blocking List is on. - // Update the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null)); - } - } else { // Fanboy's Social Blocking List is off. - // Update the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null)); - } + if (fanboysSocialBlockingListSwitch.isChecked()) { + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null)); + } else { + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null)); } } - }); // Set the Fanboy's Social Blocking List switch listener. fanboysSocialBlockingListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. - if (isChecked) { // Fanboy's Social Blocking List is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null)); - } - } else { // Fanboy's Social Blocking List is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null)); - } else { - fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null)); - } + if (isChecked) { + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null)); + } else { + fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null)); } }); // Set the UltraList switch listener. ultraListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. - if (isChecked) { // UltraList is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null)); - } else { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null)); - } - } else { // UltraList is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null)); - } else { - ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null)); - } + if (isChecked) { + ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null)); + } else { + ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null)); } }); // Set the UltraPrivacy switch listener. ultraPrivacySwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. - if (isChecked) { // UltraPrivacy is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null)); - } else { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null)); - } - } else { // UltraPrivacy is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null)); - } else { - ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null)); - } + if (isChecked) { + ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null)); + } else { + ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null)); } }); // Set the block all third-party requests switch listener. blockAllThirdPartyRequestsSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. - if (isChecked) { // Blocking all third-party requests is on. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_night, null)); - } else { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_day, null)); - } - } else { // Blocking all third-party requests is off. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_night, null)); - } else { - blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_day, null)); - } + if (isChecked) { + blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled, null)); + } else { + blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled, null)); } }); @@ -1658,50 +1407,35 @@ public class DomainSettingsFragment extends Fragment { swipeToRefreshSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView parent, View view, int position, long id) { - // Update the icon and the visibility of `nightModeTextView`. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Update the icon and the visibility of the night mode text view. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. switch (position) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: - if (defaultSwipeToRefresh) { // Swipe to refresh enabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null)); - } - } else { // Swipe to refresh disabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null)); - } + if (defaultSwipeToRefresh) { + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null)); + } else { + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null)); } - // Show the swipe to refresh TextView. + // Show the swipe to refresh text view. swipeToRefreshTextView.setVisibility(View.VISIBLE); break; case DomainsDatabaseHelper.ENABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null)); - } + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null)); - // Hide the swipe to refresh TextView. + // Hide the swipe to refresh text view. swipeToRefreshTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DISABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null)); - } else { - swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null)); - } + // Set the icon. + swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null)); - // Hide the swipe to refresh TextView. + // Hide the swipe to refresh text view. swipeToRefreshTextView.setVisibility(View.GONE); } } @@ -1717,6 +1451,7 @@ public class DomainSettingsFragment extends Fragment { @Override public void onItemSelected(AdapterView parent, View view, int position, long id) { // Update the icon and the visibility of the WebView theme text view. Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons. + // Doing this makes no sense until it can also be done with the preferences. switch (position) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: // the domain WebView theme is system default. // Set the icon according to the app WebView theme. @@ -1724,30 +1459,22 @@ public class DomainSettingsFragment extends Fragment { case DomainsDatabaseHelper.SYSTEM_DEFAULT: // The default WebView theme is system default. // Set the icon according to the app theme. if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - // Set the light mode icon. - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null)); + // Set the light theme icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null)); } else { // Set the dark theme icon. - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null)); + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null)); } break; case DomainsDatabaseHelper.LIGHT_THEME: // The default WebView theme is light. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null)); break; case DomainsDatabaseHelper.DARK_THEME: // The default WebView theme is dark. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null)); break; } @@ -1756,24 +1483,16 @@ public class DomainSettingsFragment extends Fragment { break; case DomainsDatabaseHelper.LIGHT_THEME: // The domain WebView theme is light. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null)); // Hide the WebView theme text view. webViewThemeTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DARK_THEME: // The domain WebView theme is dark. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null)); - } else { - webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null)); - } + // Set the icon. + webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null)); // Hide the WebView theme text view. webViewThemeTextView.setVisibility(View.GONE); @@ -1794,19 +1513,11 @@ public class DomainSettingsFragment extends Fragment { // Update the icon and the visibility of the wide viewport text view. switch (position) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: + // Set the icon. if (defaultWideViewport) { // Wide viewport is enabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null)); - } + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null)); } else { // Wide viewport is disabled by default. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null)); - } + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null)); } // Show the wide viewport text view. @@ -1815,23 +1526,15 @@ public class DomainSettingsFragment extends Fragment { case DomainsDatabaseHelper.ENABLED: // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null)); - } + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null)); // Hide the wide viewport text view. wideViewportTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DISABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null)); - } else { - wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null)); - } + // Set the icon. + wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null)); // Hid ethe wide viewport text view. wideViewportTextView.setVisibility(View.GONE); @@ -1853,19 +1556,11 @@ public class DomainSettingsFragment extends Fragment { switch (position) { case DomainsDatabaseHelper.SYSTEM_DEFAULT: if (defaultDisplayWebpageImages) { // Display webpage images is enabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null)); } else { // Display webpage images is disabled by default. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null)); } // Show the display images text view. @@ -1873,24 +1568,16 @@ public class DomainSettingsFragment extends Fragment { break; case DomainsDatabaseHelper.ENABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null)); // Hide the display images text view. displayImagesTextView.setVisibility(View.GONE); break; case DomainsDatabaseHelper.DISABLED: - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null)); - } else { - displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null)); - } + // Set the icon. + displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null)); // Hide the display images text view. displayImagesTextView.setVisibility(View.GONE); @@ -1908,12 +1595,8 @@ public class DomainSettingsFragment extends Fragment { pinnedSslCertificateSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. if (isChecked) { // SSL certificate pinning is enabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null)); - } else { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null)); - } + // Set the icon. + pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null)); // Update the visibility of the saved SSL certificate. if (savedSslIssuedToCNameString == null) { @@ -1985,12 +1668,8 @@ public class DomainSettingsFragment extends Fragment { noCurrentWebsiteCertificateTextView.getParent().requestChildFocus(noCurrentWebsiteCertificateTextView, noCurrentWebsiteCertificateTextView); } } else { // SSL certificate pinning is disabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null)); - } else { - pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null)); - } + // Set the icon. + pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null)); // Hide the SSl certificates and instructions. savedSslCardView.setVisibility(View.GONE); @@ -2079,12 +1758,8 @@ public class DomainSettingsFragment extends Fragment { pinnedIpAddressesSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> { // Update the icon. if (isChecked) { // IP addresses pinning is enabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null)); - } else { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null)); - } + // Set the icon. + pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null)); // Update the visibility of the saved IP addresses card view. if (savedIpAddresses == null) { // There are no saved IP addresses. @@ -2134,12 +1809,8 @@ public class DomainSettingsFragment extends Fragment { // Scroll to the bottom of the card views. currentIpAddressesCardView.getParent().requestChildFocus(currentIpAddressesCardView, currentIpAddressesCardView); } else { // IP addresses pinning is disabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null)); - } else { - pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null)); - } + // Set the icon. + pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null)); // Hide the IP addresses card views. savedIpAddressesCardView.setVisibility(View.GONE); diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainsListFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainsListFragment.java index 494606ff..92d4b885 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainsListFragment.java +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/DomainsListFragment.java @@ -20,7 +20,6 @@ package com.stoutner.privacybrowser.fragments; import android.content.Context; -import android.content.res.Configuration; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; @@ -110,15 +109,8 @@ public class DomainsListFragment extends Fragment { // Enable the delete menu item. DomainsActivity.deleteMenuItem.setEnabled(true); - // Get the current theme status. - int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - - // Set the delete icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_night); - } else { - DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_day); - } + // Set the delete icon. + DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_enabled); } // Display the domain settings fragment. diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java index 3e4e93ba..05b82dff 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java @@ -44,6 +44,8 @@ import com.stoutner.privacybrowser.R; import com.stoutner.privacybrowser.activities.MainWebViewActivity; import com.stoutner.privacybrowser.helpers.ProxyHelper; +import java.util.Objects; + public class SettingsFragment extends PreferenceFragmentCompat { // Declare the class variables. private int currentThemeStatus; @@ -121,6 +123,9 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Get a handle for the shared preferences. SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences(); + // Remove the incorrect warning below that the shared preferences might be null. + assert sharedPreferences != null; + // Get handles for the preferences. javaScriptPreference = findPreference("javascript"); cookiesPreference = findPreference(getString(R.string.cookies_key)); @@ -290,8 +295,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { customUserAgentPreference.setSummary(sharedPreferences.getString("custom_user_agent", getString(R.string.custom_user_agent_default_value))); // Only enable the custom user agent preference if the user agent is set to `Custom`. - customUserAgentPreference.setEnabled(userAgentPreference.getSummary().equals(getString(R.string.custom_user_agent))); - + customUserAgentPreference.setEnabled(Objects.equals(userAgentPreference.getSummary(), getString(R.string.custom_user_agent))); // Set the search URL as the summary text for the search preference when the preference screen is loaded. if (searchString.equals("Custom URL")) { @@ -414,11 +418,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean(getString(R.string.cookies_key), false)) { cookiesPreference.setIcon(R.drawable.cookies_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - cookiesPreference.setIcon(R.drawable.cookies_disabled_day); - } else { - cookiesPreference.setIcon(R.drawable.cookies_disabled_night); - } + cookiesPreference.setIcon(R.drawable.cookies_disabled); } // Set the DOM storage icon. @@ -426,18 +426,10 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean("dom_storage", false)) { // DOM storage is enabled. domStoragePreference.setIcon(R.drawable.dom_storage_enabled); } else { // DOM storage is disabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - domStoragePreference.setIcon(R.drawable.dom_storage_disabled_day); - } else { - domStoragePreference.setIcon(R.drawable.dom_storage_disabled_night); - } + domStoragePreference.setIcon(R.drawable.dom_storage_disabled); } } else { // The preference is disabled. The icon should be ghosted. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_day); - } else { - domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_night); - } + domStoragePreference.setIcon(R.drawable.dom_storage_ghosted); } // Set the save form data icon if API < 26. Save form data has no effect on API >= 26. @@ -445,464 +437,233 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean("save_form_data", false)) { formDataPreference.setIcon(R.drawable.form_data_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - formDataPreference.setIcon(R.drawable.form_data_disabled_day); - } else { - formDataPreference.setIcon(R.drawable.form_data_disabled_night); - } + formDataPreference.setIcon(R.drawable.form_data_disabled); } } // Set the custom user agent icon. if (customUserAgentPreference.isEnabled()) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_day); - } else { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_night); - } + customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_day); - } else { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_night); - } + customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted); } // Set the incognito mode icon. if (sharedPreferences.getBoolean("incognito_mode", false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_night); - } else { - incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_day); - } + incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_night); - } else { - incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_day); - } + incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled); } // Set the allow screenshots icon. if (sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_day); - } else { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_night); - } + allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_day); - } else { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_night); - } + allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled); } // Set the EasyList icon. if (sharedPreferences.getBoolean("easylist", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListPreference.setIcon(R.drawable.block_ads_enabled_night); - } else { - easyListPreference.setIcon(R.drawable.block_ads_enabled_day); - } + easyListPreference.setIcon(R.drawable.block_ads_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListPreference.setIcon(R.drawable.block_ads_disabled_night); - } else { - easyListPreference.setIcon(R.drawable.block_ads_disabled_day); - } + easyListPreference.setIcon(R.drawable.block_ads_disabled); } // Set the EasyPrivacy icon. if (sharedPreferences.getBoolean("easyprivacy", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night); - } else { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day); - } + easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night); - } else { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day); - } + easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled); } // Set the Fanboy lists icons. if (fanboyAnnoyanceListEnabled) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - // Set the Fanboy annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled_night); + // Set the Fanboy annoyance list icon. + fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled); - // Set the Fanboy social blocking list icon. - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted_night); - } else { - // Set the Fanboy annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled_day); - - // Set the Fanboy social blocking list icon. - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted_day); - } + // Set the Fanboy social blocking list icon. + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - // Set the Fanboy annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled_night); + // Set the Fanboy annoyance list icon. + fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled); - // Set the Fanboy social blocking list icon. - if (fanboySocialBlockingEnabled) { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_night); - } else { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_night); - } + // Set the Fanboy social blocking list icon. + if (fanboySocialBlockingEnabled) { + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled); } else { - // Set the Fanboy annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.block_ads_disabled_day); - - // Set the Fanboy social blocking list icon. - if (fanboySocialBlockingEnabled) { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_day); - } else { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_day); - } + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled); } } // Set the UltraList icon. if (sharedPreferences.getBoolean("ultralist", true)){ - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListPreference.setIcon(R.drawable.block_ads_enabled_night); - } else { - ultraListPreference.setIcon(R.drawable.block_ads_enabled_day); - } + ultraListPreference.setIcon(R.drawable.block_ads_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListPreference.setIcon(R.drawable.block_ads_disabled_night); - } else { - ultraListPreference.setIcon(R.drawable.block_ads_disabled_day); - } + ultraListPreference.setIcon(R.drawable.block_ads_disabled); } // Set the UltraPrivacy icon. if (sharedPreferences.getBoolean("ultraprivacy", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night); - } else { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day); - } + ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night); - } else { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day); - } + ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled); } // Set the block all third-party requests icon. if (sharedPreferences.getBoolean("block_all_third_party_requests", false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled_night); - } else { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled_day); - } + blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled_night); - } else { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled_day); - } + blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled); } - // Set the Google Analytics icon according to the theme. + // Set the Google Analytics icon. if (sharedPreferences.getBoolean("google_analytics", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_night); - } else { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_day); - } + googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled_night); - } else { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled_day); - } + googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled); } - // Set the Facebook Click IDs icon according to the theme. + // Set the Facebook Click IDs icon. if (sharedPreferences.getBoolean("facebook_click_ids", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_night); - } else { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_day); - } + facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_night); - } else { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_day); - } + facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled); } - // Set the Twitter AMP redirects icon according to the theme. + // Set the Twitter AMP redirects icon. if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled_night); - } else { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled_day); - } + twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled_night); - } else { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled_day); - } + twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled); } // Set the search custom URL icon. if (searchCustomURLPreference.isEnabled()) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled_night); - } else { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled_day); - } + searchCustomURLPreference.setIcon(R.drawable.search_custom_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted_night); - } else { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted_day); - } + searchCustomURLPreference.setIcon(R.drawable.search_custom_ghosted); } // Set the Proxy icons according to the theme and status. if (proxyString.equals(ProxyHelper.NONE)) { // Proxying is disabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { // Dark theme. - // Set the main proxy icon to be disabled. - proxyPreference.setIcon(R.drawable.proxy_disabled_night); - - // Set the custom proxy URL icon to be ghosted. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_night); - } else { // Light theme. - // Set the main proxy icon to be disabled. - proxyPreference.setIcon(R.drawable.proxy_disabled_day); - - // Set the custom proxy URL icon to be ghosted. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_day); - } + // Set the main proxy icon to be disabled. + proxyPreference.setIcon(R.drawable.proxy_disabled); + + // Set the custom proxy URL icon to be ghosted. + proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted); } else { // Proxying is enabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { // Dark theme. - // Set the main proxy icon to be enabled. - proxyPreference.setIcon(R.drawable.proxy_enabled_night); - - // Set the custom proxy URL icon according to its status. - if (proxyCustomUrlPreference.isEnabled()) { // Custom proxy is enabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled_night); - } else { // Custom proxy is disabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_night); - } - } else { // Light theme. - // Set the main proxy icon to be enabled. - proxyPreference.setIcon(R.drawable.proxy_enabled_day); - - // Set the custom proxy URL icon according to its status. - if (proxyCustomUrlPreference.isEnabled()) { // Custom proxy is enabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled_day); - } else { // Custom proxy is disabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_day); - } + // Set the main proxy icon to be enabled. + proxyPreference.setIcon(R.drawable.proxy_enabled); + + // Set the custom proxy URL icon according to its status. + if (proxyCustomUrlPreference.isEnabled()) { + proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled); + } else { + proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted); } } // Set the full screen browsing mode icons. if (fullScreenBrowsingMode) { // Full screen browsing mode is enabled. - // Set the `fullScreenBrowsingModePreference` icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_night); - } else { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_day); - } + // Set the full screen browsing mode preference icon. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled); // Set the hide app bar icon. - if (sharedPreferences.getBoolean("hide_app_bar", true)) { // Hide app bar is enabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_night); - } else { - hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_day); - } - } else { // Hide app bar is disabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_night); - } else { - hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_day); - } - } - } else { // Full screen browsing mode is disabled. - // Set the icons according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_night); - hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_night); + if (sharedPreferences.getBoolean("hide_app_bar", true)) { + hideAppBarPreference.setIcon(R.drawable.app_bar_enabled); } else { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_day); - hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_day); + hideAppBarPreference.setIcon(R.drawable.app_bar_disabled); } + } else { // Full screen browsing mode is disabled. + // Set the icons. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled); + hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted); } // Set the clear everything preference icon. if (clearEverything) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled_day); - } else { - clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled_night); - } + clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled); } else { clearEverythingPreference.setIcon(R.drawable.clear_everything_disabled); } // Set the clear cookies preference icon. if (clearEverything || sharedPreferences.getBoolean("clear_cookies", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearCookiesPreference.setIcon(R.drawable.cookies_cleared_day); - } else { - clearCookiesPreference.setIcon(R.drawable.cookies_cleared_night); - } + clearCookiesPreference.setIcon(R.drawable.clear_cookies_enabled); } else { - clearCookiesPreference.setIcon(R.drawable.cookies_warning); + clearCookiesPreference.setIcon(R.drawable.clear_cookies_disabled); } // Set the clear DOM storage preference icon. if (clearEverything || sharedPreferences.getBoolean("clear_dom_storage", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_night); - } else { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_day); - } + clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_enabled); } else { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning); + clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_disabled); } // Set the clear form data preference icon if the API < 26. It has no effect on newer versions of Android. if (Build.VERSION.SDK_INT < 26) { if (clearEverything || sharedPreferences.getBoolean("clear_form_data", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - clearFormDataPreference.setIcon(R.drawable.form_data_cleared_night); - } else { - clearFormDataPreference.setIcon(R.drawable.form_data_cleared_day); - } + clearFormDataPreference.setIcon(R.drawable.clear_form_data_enabled); } else { - clearFormDataPreference.setIcon(R.drawable.form_data_warning); + clearFormDataPreference.setIcon(R.drawable.clear_form_data_disabled); } } // Set the clear logcat preference icon. if (clearEverything || sharedPreferences.getBoolean(getString(R.string.clear_logcat_key), true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearLogcatPreference.setIcon(R.drawable.bug_cleared_day); - } else { - clearLogcatPreference.setIcon(R.drawable.bug_cleared_night); - } + clearLogcatPreference.setIcon(R.drawable.clear_logcat_enabled); } else { - clearLogcatPreference.setIcon(R.drawable.bug_warning); + clearLogcatPreference.setIcon(R.drawable.clear_logcat_disabled); } // Set the clear cache preference icon. if (clearEverything || sharedPreferences.getBoolean("clear_cache", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - clearCachePreference.setIcon(R.drawable.cache_cleared_night); - } else { - clearCachePreference.setIcon(R.drawable.cache_cleared_day); - } + clearCachePreference.setIcon(R.drawable.clear_cache_enabled); } else { - clearCachePreference.setIcon(R.drawable.cache_warning); + clearCachePreference.setIcon(R.drawable.clear_cache_disabled); } // Set the open intents in new tab preference icon. if (sharedPreferences.getBoolean("open_intents_in_new_tab", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled_night); - } else { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled_day); - } + openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled_night); - } else { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled_day); - } + openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled); } // Set the swipe to refresh preference icon. if (sharedPreferences.getBoolean("swipe_to_refresh", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled_day); - } else { - swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled_night); - } + swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled_day); - } else { - swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled_night); - } + swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled); } // Set the download with external app preference icon. if (sharedPreferences.getBoolean(getString(R.string.download_with_external_app_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled_day); - } else { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled_night); - } + downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled_day); - } else { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled_night); - } + downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled); } // Set the scroll app bar preference icon. if (sharedPreferences.getBoolean(getString(R.string.scroll_app_bar_key), true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_day); - } else { - scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_night); - } + scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_day); - } else { - scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_night); - } + scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled); } // Set the bottom app bar preference icon. if (sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_day); - } else { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_night); - } + bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_day); - } else { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_night); - } + bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled); } // Set the display additional app bar icons preference icon. if (sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled_day); - } else { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled_night); - } + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled_day); - } else { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled_night); - } + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled); } // Set the WebView theme preference icon. @@ -910,58 +671,35 @@ public class SettingsFragment extends PreferenceFragmentCompat { case 0: // The system default WebView theme is selected. // Set the icon according to the app theme. if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemePreference.setIcon(R.drawable.webview_light_theme_day); + webViewThemePreference.setIcon(R.drawable.webview_light_theme); } else { - webViewThemePreference.setIcon(R.drawable.webview_dark_theme_night); + webViewThemePreference.setIcon(R.drawable.webview_dark_theme); } break; case 1: // The light WebView theme is selected. - // Set the icon according to the app theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemePreference.setIcon(R.drawable.webview_light_theme_day); - } else { - webViewThemePreference.setIcon(R.drawable.webview_light_theme_night); - } + // Set the icon. + webViewThemePreference.setIcon(R.drawable.webview_light_theme); break; case 2: // The dark WebView theme is selected. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemePreference.setIcon(R.drawable.webview_dark_theme_day); - } else { - webViewThemePreference.setIcon(R.drawable.webview_dark_theme_night); - } + // Set the icon. + webViewThemePreference.setIcon(R.drawable.webview_dark_theme); break; } // Set the wide viewport preference icon. if (sharedPreferences.getBoolean("wide_viewport", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled_night); - } else { - wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled_day); - } + wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled_night); - } else { - wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled_day); - } + wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled); } // Set the display webpage images preference icon. if (sharedPreferences.getBoolean("display_webpage_images", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesPreference.setIcon(R.drawable.images_enabled_night); - } else { - displayWebpageImagesPreference.setIcon(R.drawable.images_enabled_day); - } + displayWebpageImagesPreference.setIcon(R.drawable.images_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesPreference.setIcon(R.drawable.images_disabled_night); - } else { - displayWebpageImagesPreference.setIcon(R.drawable.images_disabled_day); - } + displayWebpageImagesPreference.setIcon(R.drawable.images_disabled); } } @@ -974,6 +712,9 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Get a handle for the shared preferences. SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences(); + // Remove the incorrect lint warning below that the shared preferences might be null. + assert sharedPreferences != null; + // Unregister the shared preference listener. sharedPreferences.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener); } @@ -990,6 +731,9 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Get a handle for the shared preferences. SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences(); + // Remove the incorrect lint warning below that the shared preferences might be null. + assert sharedPreferences != null; + // Re-register the shared preference listener. sharedPreferences.registerOnSharedPreferenceChangeListener(sharedPreferenceChangeListener); } @@ -1013,11 +757,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean("dom_storage", false)) { domStoragePreference.setIcon(R.drawable.dom_storage_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - domStoragePreference.setIcon(R.drawable.dom_storage_disabled_day); - } else { - domStoragePreference.setIcon(R.drawable.dom_storage_disabled_night); - } + domStoragePreference.setIcon(R.drawable.dom_storage_disabled); } } else { // The JavaScript preference is disabled. // Update the icon for the JavaScript preference. @@ -1027,11 +767,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { domStoragePreference.setEnabled(false); // Set the icon for DOM storage preference to be ghosted. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_day); - } else { - domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_night); - } + domStoragePreference.setIcon(R.drawable.dom_storage_ghosted); } break; @@ -1040,11 +776,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean(context.getString(R.string.cookies_key), false)) { cookiesPreference.setIcon(R.drawable.cookies_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - cookiesPreference.setIcon(R.drawable.cookies_disabled_day); - } else { - cookiesPreference.setIcon(R.drawable.cookies_disabled_night); - } + cookiesPreference.setIcon(R.drawable.cookies_disabled); } break; @@ -1053,11 +785,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean("dom_storage", false)) { domStoragePreference.setIcon(R.drawable.dom_storage_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - domStoragePreference.setIcon(R.drawable.dom_storage_disabled_day); - } else { - domStoragePreference.setIcon(R.drawable.dom_storage_disabled_night); - } + domStoragePreference.setIcon(R.drawable.dom_storage_disabled); } break; @@ -1067,11 +795,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { if (sharedPreferences.getBoolean("save_form_data", false)) { formDataPreference.setIcon(R.drawable.form_data_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - formDataPreference.setIcon(R.drawable.form_data_disabled_day); - } else { - formDataPreference.setIcon(R.drawable.form_data_disabled_night); - } + formDataPreference.setIcon(R.drawable.form_data_disabled); } break; @@ -1094,12 +818,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Disable the custom user agent preference. customUserAgentPreference.setEnabled(false); - // Set the custom user agent preference icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_night); - } else { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_day); - } + // Set the custom user agent preference icon. + customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted); break; case MainWebViewActivity.SETTINGS_CUSTOM_USER_AGENT: @@ -1109,12 +829,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Enable the custom user agent preference. customUserAgentPreference.setEnabled(true); - // Set the custom user agent preference icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_night); - } else { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_day); - } + // Set the custom user agent preference icon. + customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled); break; default: @@ -1124,12 +840,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Disable the custom user agent preference. customUserAgentPreference.setEnabled(false); - // Set the custom user agent preference icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_night); - } else { - customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_day); - } + // Set the custom user agent preference icon. + customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted); } break; @@ -1141,34 +853,18 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "incognito_mode": // Update the icon. if (sharedPreferences.getBoolean("incognito_mode", false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_night); - } else { - incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_day); - } + incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_night); - } else { - incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_day); - } + incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled); } break; case "allow_screenshots": // Update the icon. if (sharedPreferences.getBoolean(context.getString(R.string.allow_screenshots_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_day); - } else { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_night); - } + allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_day); - } else { - allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_night); - } + allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled); } // Restart Privacy Browser. @@ -1178,34 +874,18 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "easylist": // Update the icon. if (sharedPreferences.getBoolean("easylist", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListPreference.setIcon(R.drawable.block_ads_enabled_night); - } else { - easyListPreference.setIcon(R.drawable.block_ads_enabled_day); - } + easyListPreference.setIcon(R.drawable.block_ads_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyListPreference.setIcon(R.drawable.block_ads_disabled_night); - } else { - easyListPreference.setIcon(R.drawable.block_ads_disabled_day); - } + easyListPreference.setIcon(R.drawable.block_ads_disabled); } break; case "easyprivacy": // Update the icon. if (sharedPreferences.getBoolean("easyprivacy", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night); - } else { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day); - } + easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night); - } else { - easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day); - } + easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled); } break; @@ -1215,40 +895,20 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Update the Fanboy icons. if (currentFanboyAnnoyanceList) { // Fanboy's annoyance list is enabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - // Update the Fanboy's annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled_night); + // Update the Fanboy's annoyance list icon. + fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled); - // Update the Fanboy's social blocking list icon. - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted_night); - } else { - // Update the Fanboy's annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled_day); - - // Update the Fanboy's social blocking list icon. - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted_day); - } + // Update the Fanboy's social blocking list icon. + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted); } else { // Fanboy's annoyance list is disabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - // Update the Fanboy's annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled_night); + // Update the Fanboy's annoyance list icon. + fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled); - // Update the Fanboy's social blocking list icon. - if (currentFanboySocialBlockingList) { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_night); - } else { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_night); - } + // Update the Fanboy's social blocking list icon. + if (currentFanboySocialBlockingList) { + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled); } else { - // Update the Fanboy's annoyance list icon. - fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled_day); - - // Update the Fanboy's social blocking list icon. - if (currentFanboySocialBlockingList) { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_day); - } else { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_day); - } + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled); } } @@ -1259,119 +919,63 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "fanboys_social_blocking_list": // Update the icon. if (sharedPreferences.getBoolean("fanboys_social_blocking_list", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_night); - } else { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_day); - } + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_night); - } else { - fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_day); - } + fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled); } break; case "ultralist": // Update the icon. if (sharedPreferences.getBoolean("ultralist", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListPreference.setIcon(R.drawable.block_ads_enabled_night); - } else { - ultraListPreference.setIcon(R.drawable.block_ads_enabled_day); - } + ultraListPreference.setIcon(R.drawable.block_ads_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraListPreference.setIcon(R.drawable.block_ads_disabled_night); - } else { - ultraListPreference.setIcon(R.drawable.block_ads_disabled_day); - } + ultraListPreference.setIcon(R.drawable.block_ads_disabled); } break; case "ultraprivacy": // Update the icon. if (sharedPreferences.getBoolean("ultraprivacy", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night); - } else { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day); - } + ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night); - } else { - ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day); - } + ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled); } break; case "block_all_third_party_requests": // Update the icon. if (sharedPreferences.getBoolean("block_all_third_party_requests", false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled_night); - } else { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled_day); - } + blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled_night); - } else { - blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled_day); - } + blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled); } break; case "google_analytics": // Update the icon. if (sharedPreferences.getBoolean("google_analytics", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_night); - } else { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_day); - } + googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled_night); - } else { - googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled_day); - } + googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled); } break; case "facebook_click_ids": // Update the icon. if (sharedPreferences.getBoolean("facebook_click_ids", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_night); - } else { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_day); - } + facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_night); - } else { - facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_day); - } + facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled); } break; case "twitter_amp_redirects": // Update the icon. if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled_night); - } else { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled_day); - } + twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled_night); - } else { - twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled_day); - } + twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled); } break; @@ -1384,15 +988,11 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Set the summary text to `R.string.custom_url`, which is translated. searchPreference.setSummary(R.string.custom_url); - // Enable `searchCustomURLPreference`. + // Enable the search custom URL preference. searchCustomURLPreference.setEnabled(true); - // Set the `searchCustomURLPreference` according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled_night); - } else { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled_day); - } + // Set the search custom URL preference icon. + searchCustomURLPreference.setIcon(R.drawable.search_custom_enabled); } else { // `Custom URL` is not selected. // Set the summary text to `newSearchString`. searchPreference.setSummary(newSearchString); @@ -1400,12 +1000,8 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Disable `searchCustomURLPreference`. searchCustomURLPreference.setEnabled(false); - // Set the `searchCustomURLPreference` according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted_night); - } else { - searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted_day); - } + // Set the search custom URL preference icon. + searchCustomURLPreference.setIcon(R.drawable.search_custom_ghosted); } break; @@ -1442,40 +1038,20 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Update the icons. if (currentProxyString.equals(ProxyHelper.NONE)) { // Proxying is disabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { // Dark theme. - // Set the main proxy icon to be disabled - proxyPreference.setIcon(R.drawable.proxy_disabled_night); - - // Set the custom proxy URL icon to be ghosted. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_night); - } else { // Light theme. - // Set the main proxy icon to be disabled. - proxyPreference.setIcon(R.drawable.proxy_disabled_day); - - // Set the custom proxy URL icon to be ghosted. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_day); - } + // Set the main proxy icon to be disabled + proxyPreference.setIcon(R.drawable.proxy_disabled); + + // Set the custom proxy URL icon to be ghosted. + proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted); } else { // Proxying is enabled. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { // Dark theme. - // Set the main proxy icon to be enabled. - proxyPreference.setIcon(R.drawable.proxy_enabled_night); - - /// Set the custom proxy URL icon according to its status. - if (proxyCustomUrlPreference.isEnabled()) { // Custom proxy is enabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled_night); - } else { // Custom proxy is disabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_night); - } - } else { // Light theme. - // Set the main proxy icon to be enabled. - proxyPreference.setIcon(R.drawable.proxy_enabled_day); - - // Set the custom proxy URL icon according to its status. - if (proxyCustomUrlPreference.isEnabled()) { // Custom proxy is enabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled_day); - } else { // Custom proxy is disabled. - proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_day); - } + // Set the main proxy icon to be enabled. + proxyPreference.setIcon(R.drawable.proxy_enabled); + + /// Set the custom proxy URL icon according to its status. + if (proxyCustomUrlPreference.isEnabled()) { + proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled); + } else { + proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted); } } break; @@ -1487,57 +1063,29 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "full_screen_browsing_mode": if (sharedPreferences.getBoolean("full_screen_browsing_mode", false)) { // Full screen browsing is enabled. - // Set the full screen browsing mode preference icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_night); - } else { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_day); - } + // Set the full screen browsing mode preference icon. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled); // Set the hide app bar preference icon. - if (sharedPreferences.getBoolean("hide_app_bar", true)) { // Hide app bar is enabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_night); - } else { - hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_day); - } - } else { // Hide app bar is disabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_night); - } else { - hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_day); - } - } - } else { // Full screen browsing is disabled. - // Update the icons according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_night); - hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_night); + if (sharedPreferences.getBoolean("hide_app_bar", true)) { + hideAppBarPreference.setIcon(R.drawable.app_bar_enabled); } else { - fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_day); - hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_day); + hideAppBarPreference.setIcon(R.drawable.app_bar_disabled); } + } else { // Full screen browsing is disabled. + // Update the icons. + fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled); + hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted); } break; case "hide_app_bar": // Update the icon. - if (sharedPreferences.getBoolean("hide_app_bar", true)) { // Hide app bar is enabled. - // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_night); - } else { - hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_day); - } + if (sharedPreferences.getBoolean("hide_app_bar", true)) { + hideAppBarPreference.setIcon(R.drawable.app_bar_enabled); } else { // Hide app bar is disabled. // Set the icon according to the theme. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_night); - } else { - hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_day); - } + hideAppBarPreference.setIcon(R.drawable.app_bar_disabled); } break; @@ -1554,96 +1102,64 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Update the clear everything preference icon. if (newClearEverythingBoolean) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled_day); - } else { - clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled_night); - } + clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled); } else { clearEverythingPreference.setIcon(R.drawable.clear_everything_disabled); } // Update the clear cookies preference icon. if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_cookies", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearCookiesPreference.setIcon(R.drawable.cookies_cleared_day); - } else { - clearCookiesPreference.setIcon(R.drawable.cookies_cleared_night); - } + clearCookiesPreference.setIcon(R.drawable.clear_cookies_enabled); } else { - clearCookiesPreference.setIcon(R.drawable.cookies_warning); + clearCookiesPreference.setIcon(R.drawable.clear_cookies_disabled); } // Update the clear dom storage preference icon. if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_dom_storage", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_day); - } else { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_night); - } + clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_enabled); } else { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning); + clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_disabled); } // Update the clear form data preference icon if the API < 26. if (Build.VERSION.SDK_INT < 26) { if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_form_data", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearFormDataPreference.setIcon(R.drawable.form_data_cleared_day); - } else { - clearFormDataPreference.setIcon(R.drawable.form_data_cleared_night); - } + clearFormDataPreference.setIcon(R.drawable.clear_form_data_enabled); } else { - clearFormDataPreference.setIcon(R.drawable.form_data_warning); + clearFormDataPreference.setIcon(R.drawable.clear_form_data_disabled); } } // Update the clear logcat preference icon. if (newClearEverythingBoolean || sharedPreferences.getBoolean(context.getString(R.string.clear_logcat_key), true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearLogcatPreference.setIcon(R.drawable.bug_cleared_day); - } else { - clearLogcatPreference.setIcon(R.drawable.bug_cleared_night); - } + clearLogcatPreference.setIcon(R.drawable.clear_logcat_enabled); } else { - clearLogcatPreference.setIcon(R.drawable.cache_warning); + clearLogcatPreference.setIcon(R.drawable.clear_cache_disabled); } // Update the clear cache preference icon. if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_cache", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearCachePreference.setIcon(R.drawable.cache_cleared_day); - } else { - clearCachePreference.setIcon(R.drawable.cache_cleared_night); - } + clearCachePreference.setIcon(R.drawable.clear_cache_enabled); } else { - clearCachePreference.setIcon(R.drawable.cache_warning); + clearCachePreference.setIcon(R.drawable.clear_cache_disabled); } break; case "clear_cookies": // Update the icon. if (sharedPreferences.getBoolean("clear_cookies", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearCookiesPreference.setIcon(R.drawable.cookies_cleared_day); - } else { - clearCookiesPreference.setIcon(R.drawable.cookies_cleared_night); - } + clearCookiesPreference.setIcon(R.drawable.clear_cookies_enabled); } else { - clearCookiesPreference.setIcon(R.drawable.cookies_warning); + clearCookiesPreference.setIcon(R.drawable.clear_cookies_disabled); } break; case "clear_dom_storage": // Update the icon. if (sharedPreferences.getBoolean("clear_dom_storage", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_day); - } else { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_night); - } + clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_enabled); } else { - clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning); + clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_disabled); } break; @@ -1651,39 +1167,27 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "clear_form_data": // Update the icon. if (sharedPreferences.getBoolean("clear_form_data", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearFormDataPreference.setIcon(R.drawable.form_data_cleared_day); - } else { - clearFormDataPreference.setIcon(R.drawable.form_data_cleared_night); - } + clearFormDataPreference.setIcon(R.drawable.clear_form_data_enabled); } else { - clearFormDataPreference.setIcon(R.drawable.form_data_warning); + clearFormDataPreference.setIcon(R.drawable.clear_form_data_disabled); } break; case "clear_logcat": // Update the icon. if (sharedPreferences.getBoolean(context.getString(R.string.clear_logcat_key), true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearLogcatPreference.setIcon(R.drawable.bug_cleared_day); - } else { - clearLogcatPreference.setIcon(R.drawable.bug_cleared_night); - } + clearLogcatPreference.setIcon(R.drawable.clear_logcat_enabled); } else { - clearLogcatPreference.setIcon(R.drawable.bug_warning); + clearLogcatPreference.setIcon(R.drawable.clear_logcat_disabled); } break; case "clear_cache": // Update the icon. if (sharedPreferences.getBoolean("clear_cache", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - clearCachePreference.setIcon(R.drawable.cache_cleared_day); - } else { - clearCachePreference.setIcon(R.drawable.cache_cleared_night); - } + clearCachePreference.setIcon(R.drawable.clear_cache_enabled); } else { - clearCachePreference.setIcon(R.drawable.cache_warning); + clearCachePreference.setIcon(R.drawable.clear_cache_disabled); } break; @@ -1700,85 +1204,45 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "open_intents_in_new_tab": // Update the icon. if (sharedPreferences.getBoolean("open_intents_in_new_tab", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled_day); - } else { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled_night); - } + openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled_day); - } else { - openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled_night); - } + openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled); } break; case "swipe_to_refresh": // Update the icon. if (sharedPreferences.getBoolean("swipe_to_refresh", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled_day); - } else { - swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled_night); - } + swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled_day); - } else { - swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled_night); - } + swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled); } break; case "download_with_external_app": // Update the icon. if (sharedPreferences.getBoolean(context.getString(R.string.download_with_external_app_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled_day); - } else { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled_night); - } + downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled_day); - } else { - downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled_night); - } + downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled); } break; case "scroll_app_bar": // Update the icon. if (sharedPreferences.getBoolean(context.getString(R.string.scroll_app_bar_key), true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_day); - } else { - scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_night); - } + scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_day); - } else { - scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_night); - } + scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled); } break; case "bottom_app_bar": // Update the icon. if (sharedPreferences.getBoolean(context.getString(R.string.bottom_app_bar_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_day); - } else { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_night); - } + bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_day); - } else { - bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_night); - } + bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled); } // Restart Privacy Browser. @@ -1788,17 +1252,9 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "display_additional_app_bar_icons": // Update the icon. if (sharedPreferences.getBoolean(context.getString(R.string.display_additional_app_bar_icons_key), false)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled_day); - } else { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled_night); - } + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled_day); - } else { - displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled_night); - } + displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled); } break; @@ -1806,7 +1262,7 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Get the new theme. String newAppTheme = sharedPreferences.getString("app_theme", context.getString(R.string.app_theme_default_value)); - // Update the system according to the new theme. A switch statement cannot be used because the theme entry values string array is not a compile time constant. + // Update the system according to the new theme. A switch statement cannot be used because the theme entry values string array is not a compile-time constant. if (newAppTheme.equals(appThemeEntryValuesStringArray[1])) { // The light theme is selected. // Update the theme preference summary text. appThemePreference.setSummary(appThemeEntriesStringArray[1]); @@ -1859,28 +1315,22 @@ public class SettingsFragment extends PreferenceFragmentCompat { // Update the icon. switch (newWebViewThemeEntryNumber) { case 0: // The system default WebView theme is selected. - // Set the icon according to the app theme. + // Set the icon. if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemePreference.setIcon(R.drawable.webview_light_theme_day); + webViewThemePreference.setIcon(R.drawable.webview_light_theme); } else { - webViewThemePreference.setIcon(R.drawable.webview_dark_theme_night); + webViewThemePreference.setIcon(R.drawable.webview_dark_theme); } break; - case 1: // The system default WebView theme is selected. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemePreference.setIcon(R.drawable.webview_light_theme_day); - } else { - webViewThemePreference.setIcon(R.drawable.webview_light_theme_night); - } + case 1: // The light theme is selected. + // Set the icon. + webViewThemePreference.setIcon(R.drawable.webview_light_theme); break; - case 2: // The system default WebView theme is selected. - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { - webViewThemePreference.setIcon(R.drawable.webview_dark_theme_day); - } else { - webViewThemePreference.setIcon(R.drawable.webview_dark_theme_night); - } + case 2: // The dark theme is selected. + // Set the icon. + webViewThemePreference.setIcon(R.drawable.webview_dark_theme); break; } @@ -1891,34 +1341,18 @@ public class SettingsFragment extends PreferenceFragmentCompat { case "wide_viewport": // Update the icon. if (sharedPreferences.getBoolean("wide_viewport", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled_night); - } else { - wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled_day); - } + wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled_night); - } else { - wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled_day); - } + wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled); } break; case "display_webpage_images": // Update the icon. if (sharedPreferences.getBoolean("display_webpage_images", true)) { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesPreference.setIcon(R.drawable.images_enabled_night); - } else { - displayWebpageImagesPreference.setIcon(R.drawable.images_enabled_day); - } + displayWebpageImagesPreference.setIcon(R.drawable.images_enabled); } else { - if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) { - displayWebpageImagesPreference.setIcon(R.drawable.images_disabled_night); - } else { - displayWebpageImagesPreference.setIcon(R.drawable.images_disabled_day); - } + displayWebpageImagesPreference.setIcon(R.drawable.images_disabled); } break; } diff --git a/app/src/main/res/drawable/about_day.xml b/app/src/main/res/drawable/about.xml similarity index 93% rename from app/src/main/res/drawable/about_day.xml rename to app/src/main/res/drawable/about.xml index 1acdb95e..f364c440 100644 --- a/app/src/main/res/drawable/about_day.xml +++ b/app/src/main/res/drawable/about.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > diff --git a/app/src/main/res/drawable/about_blue_day.xml b/app/src/main/res/drawable/about_blue.xml similarity index 92% rename from app/src/main/res/drawable/about_blue_day.xml rename to app/src/main/res/drawable/about_blue.xml index 324c0856..f68c761f 100644 --- a/app/src/main/res/drawable/about_blue_day.xml +++ b/app/src/main/res/drawable/about_blue.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > \ No newline at end of file diff --git a/app/src/main/res/drawable/about_blue_night.xml b/app/src/main/res/drawable/about_blue_night.xml deleted file mode 100644 index a00cb9f3..00000000 --- a/app/src/main/res/drawable/about_blue_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/about_night.xml b/app/src/main/res/drawable/about_night.xml deleted file mode 100644 index 5b002d86..00000000 --- a/app/src/main/res/drawable/about_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/add.xml b/app/src/main/res/drawable/add.xml index c84fef17..c9f67323 100644 --- a/app/src/main/res/drawable/add.xml +++ b/app/src/main/res/drawable/add.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > diff --git a/app/src/main/res/drawable/allow_screenshots_disabled_night.xml b/app/src/main/res/drawable/allow_screenshots_disabled.xml similarity index 92% rename from app/src/main/res/drawable/allow_screenshots_disabled_night.xml rename to app/src/main/res/drawable/allow_screenshots_disabled.xml index 3ee27bf9..320c7c07 100644 --- a/app/src/main/res/drawable/allow_screenshots_disabled_night.xml +++ b/app/src/main/res/drawable/allow_screenshots_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > diff --git a/app/src/main/res/drawable/allow_screenshots_disabled_day.xml b/app/src/main/res/drawable/allow_screenshots_enabled.xml similarity index 93% rename from app/src/main/res/drawable/allow_screenshots_disabled_day.xml rename to app/src/main/res/drawable/allow_screenshots_enabled.xml index 2821f359..81a8e2d1 100644 --- a/app/src/main/res/drawable/allow_screenshots_disabled_day.xml +++ b/app/src/main/res/drawable/allow_screenshots_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > diff --git a/app/src/main/res/drawable/allow_screenshots_enabled_day.xml b/app/src/main/res/drawable/allow_screenshots_enabled_day.xml deleted file mode 100644 index 71df5a39..00000000 --- a/app/src/main/res/drawable/allow_screenshots_enabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/allow_screenshots_enabled_night.xml b/app/src/main/res/drawable/allow_screenshots_enabled_night.xml deleted file mode 100644 index c15f6e0b..00000000 --- a/app/src/main/res/drawable/allow_screenshots_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/app_bar_enabled_day.xml b/app/src/main/res/drawable/app_bar_disabled.xml similarity index 91% rename from app/src/main/res/drawable/app_bar_enabled_day.xml rename to app/src/main/res/drawable/app_bar_disabled.xml index 075e1b8c..ae32dd11 100644 --- a/app/src/main/res/drawable/app_bar_enabled_day.xml +++ b/app/src/main/res/drawable/app_bar_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > \ No newline at end of file diff --git a/app/src/main/res/drawable/app_bar_disabled_day.xml b/app/src/main/res/drawable/app_bar_disabled_day.xml deleted file mode 100644 index e3bcd137..00000000 --- a/app/src/main/res/drawable/app_bar_disabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/app_bar_disabled_night.xml b/app/src/main/res/drawable/app_bar_disabled_night.xml deleted file mode 100644 index 3e2e67bb..00000000 --- a/app/src/main/res/drawable/app_bar_disabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/app_bar_ghosted_day.xml b/app/src/main/res/drawable/app_bar_enabled.xml similarity index 92% rename from app/src/main/res/drawable/app_bar_ghosted_day.xml rename to app/src/main/res/drawable/app_bar_enabled.xml index 5868539a..38af2cd7 100644 --- a/app/src/main/res/drawable/app_bar_ghosted_day.xml +++ b/app/src/main/res/drawable/app_bar_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > \ No newline at end of file diff --git a/app/src/main/res/drawable/app_bar_enabled_night.xml b/app/src/main/res/drawable/app_bar_ghosted.xml similarity index 91% rename from app/src/main/res/drawable/app_bar_enabled_night.xml rename to app/src/main/res/drawable/app_bar_ghosted.xml index 4937d934..b8ec88ef 100644 --- a/app/src/main/res/drawable/app_bar_enabled_night.xml +++ b/app/src/main/res/drawable/app_bar_ghosted.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > \ No newline at end of file diff --git a/app/src/main/res/drawable/app_bar_ghosted_night.xml b/app/src/main/res/drawable/app_bar_ghosted_night.xml deleted file mode 100644 index c31e0709..00000000 --- a/app/src/main/res/drawable/app_bar_ghosted_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/app_theme_day.xml b/app/src/main/res/drawable/app_theme.xml similarity index 95% rename from app/src/main/res/drawable/app_theme_day.xml rename to app/src/main/res/drawable/app_theme.xml index b08894f5..4ca53003 100644 --- a/app/src/main/res/drawable/app_theme_day.xml +++ b/app/src/main/res/drawable/app_theme.xml @@ -9,6 +9,6 @@ android:autoMirrored="true"> \ No newline at end of file diff --git a/app/src/main/res/drawable/app_theme_night.xml b/app/src/main/res/drawable/app_theme_night.xml deleted file mode 100644 index 6bee5125..00000000 --- a/app/src/main/res/drawable/app_theme_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/back.xml b/app/src/main/res/drawable/back.xml index 23c5b3d3..c23103aa 100644 --- a/app/src/main/res/drawable/back.xml +++ b/app/src/main/res/drawable/back.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/block_ads_disabled_night.xml b/app/src/main/res/drawable/block_ads_disabled.xml similarity index 91% rename from app/src/main/res/drawable/block_ads_disabled_night.xml rename to app/src/main/res/drawable/block_ads_disabled.xml index 01f411a0..5df79df1 100644 --- a/app/src/main/res/drawable/block_ads_disabled_night.xml +++ b/app/src/main/res/drawable/block_ads_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > - + \ No newline at end of file diff --git a/app/src/main/res/drawable/block_ads_disabled_day.xml b/app/src/main/res/drawable/block_ads_enabled.xml similarity index 93% rename from app/src/main/res/drawable/block_ads_disabled_day.xml rename to app/src/main/res/drawable/block_ads_enabled.xml index 8a3793c0..f1dbcba9 100644 --- a/app/src/main/res/drawable/block_ads_disabled_day.xml +++ b/app/src/main/res/drawable/block_ads_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > diff --git a/app/src/main/res/drawable/block_ads_enabled_day.xml b/app/src/main/res/drawable/block_ads_enabled_day.xml deleted file mode 100644 index dc19afa2..00000000 --- a/app/src/main/res/drawable/block_ads_enabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/block_ads_enabled_night.xml b/app/src/main/res/drawable/block_ads_enabled_night.xml deleted file mode 100644 index 61ab6701..00000000 --- a/app/src/main/res/drawable/block_ads_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/block_all_third_party_requests_enabled_day.xml b/app/src/main/res/drawable/block_all_third_party_requests_disabled.xml similarity index 92% rename from app/src/main/res/drawable/block_all_third_party_requests_enabled_day.xml rename to app/src/main/res/drawable/block_all_third_party_requests_disabled.xml index 183d6b32..995739ba 100644 --- a/app/src/main/res/drawable/block_all_third_party_requests_enabled_day.xml +++ b/app/src/main/res/drawable/block_all_third_party_requests_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > diff --git a/app/src/main/res/drawable/block_all_third_party_requests_disabled_day.xml b/app/src/main/res/drawable/block_all_third_party_requests_disabled_day.xml deleted file mode 100644 index d295253c..00000000 --- a/app/src/main/res/drawable/block_all_third_party_requests_disabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/block_all_third_party_requests_disabled_night.xml b/app/src/main/res/drawable/block_all_third_party_requests_enabled.xml similarity index 93% rename from app/src/main/res/drawable/block_all_third_party_requests_disabled_night.xml rename to app/src/main/res/drawable/block_all_third_party_requests_enabled.xml index eaf7be05..838887d7 100644 --- a/app/src/main/res/drawable/block_all_third_party_requests_disabled_night.xml +++ b/app/src/main/res/drawable/block_all_third_party_requests_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > diff --git a/app/src/main/res/drawable/block_all_third_party_requests_enabled_night.xml b/app/src/main/res/drawable/block_all_third_party_requests_enabled_night.xml deleted file mode 100644 index b57c06ba..00000000 --- a/app/src/main/res/drawable/block_all_third_party_requests_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/block_tracking_disabled_night.xml b/app/src/main/res/drawable/block_tracking_disabled.xml similarity index 93% rename from app/src/main/res/drawable/block_tracking_disabled_night.xml rename to app/src/main/res/drawable/block_tracking_disabled.xml index b8cc4282..b66927b8 100644 --- a/app/src/main/res/drawable/block_tracking_disabled_night.xml +++ b/app/src/main/res/drawable/block_tracking_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/block_tracking_disabled_day.xml b/app/src/main/res/drawable/block_tracking_enabled.xml similarity index 94% rename from app/src/main/res/drawable/block_tracking_disabled_day.xml rename to app/src/main/res/drawable/block_tracking_enabled.xml index 6d24c899..8b46fbd1 100644 --- a/app/src/main/res/drawable/block_tracking_disabled_day.xml +++ b/app/src/main/res/drawable/block_tracking_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/block_tracking_enabled_day.xml b/app/src/main/res/drawable/block_tracking_enabled_day.xml deleted file mode 100644 index 26f157dc..00000000 --- a/app/src/main/res/drawable/block_tracking_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/block_tracking_enabled_night.xml b/app/src/main/res/drawable/block_tracking_enabled_night.xml deleted file mode 100644 index be2c7b63..00000000 --- a/app/src/main/res/drawable/block_tracking_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bookmarks_day.xml b/app/src/main/res/drawable/bookmarks.xml similarity index 91% rename from app/src/main/res/drawable/bookmarks_day.xml rename to app/src/main/res/drawable/bookmarks.xml index fba9799e..ddf327d9 100644 --- a/app/src/main/res/drawable/bookmarks_day.xml +++ b/app/src/main/res/drawable/bookmarks.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/bookmarks_night.xml b/app/src/main/res/drawable/bookmarks_night.xml deleted file mode 100644 index 50c7560c..00000000 --- a/app/src/main/res/drawable/bookmarks_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bottom_app_bar_disabled_day.xml b/app/src/main/res/drawable/bottom_app_bar_disabled.xml similarity index 91% rename from app/src/main/res/drawable/bottom_app_bar_disabled_day.xml rename to app/src/main/res/drawable/bottom_app_bar_disabled.xml index ec31dd7f..f5d22131 100644 --- a/app/src/main/res/drawable/bottom_app_bar_disabled_day.xml +++ b/app/src/main/res/drawable/bottom_app_bar_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/bottom_app_bar_disabled_night.xml b/app/src/main/res/drawable/bottom_app_bar_disabled_night.xml deleted file mode 100644 index a59eb9ea..00000000 --- a/app/src/main/res/drawable/bottom_app_bar_disabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bottom_app_bar_enabled_day.xml b/app/src/main/res/drawable/bottom_app_bar_enabled.xml similarity index 91% rename from app/src/main/res/drawable/bottom_app_bar_enabled_day.xml rename to app/src/main/res/drawable/bottom_app_bar_enabled.xml index bfa6adc0..f396d052 100644 --- a/app/src/main/res/drawable/bottom_app_bar_enabled_day.xml +++ b/app/src/main/res/drawable/bottom_app_bar_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/bottom_app_bar_enabled_night.xml b/app/src/main/res/drawable/bottom_app_bar_enabled_night.xml deleted file mode 100644 index 12ac6535..00000000 --- a/app/src/main/res/drawable/bottom_app_bar_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bug_cleared_day.xml b/app/src/main/res/drawable/bug_cleared_day.xml deleted file mode 100644 index b804f624..00000000 --- a/app/src/main/res/drawable/bug_cleared_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/bug_cleared_night.xml b/app/src/main/res/drawable/bug_cleared_night.xml deleted file mode 100644 index 181cb8fb..00000000 --- a/app/src/main/res/drawable/bug_cleared_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/cache_cleared_night.xml b/app/src/main/res/drawable/cache_cleared_night.xml deleted file mode 100644 index 2a6d4c62..00000000 --- a/app/src/main/res/drawable/cache_cleared_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/cache_warning.xml b/app/src/main/res/drawable/clear_cache_disabled.xml similarity index 100% rename from app/src/main/res/drawable/cache_warning.xml rename to app/src/main/res/drawable/clear_cache_disabled.xml diff --git a/app/src/main/res/drawable/cache_cleared_day.xml b/app/src/main/res/drawable/clear_cache_enabled.xml similarity index 93% rename from app/src/main/res/drawable/cache_cleared_day.xml rename to app/src/main/res/drawable/clear_cache_enabled.xml index 0ddda467..330cf11e 100644 --- a/app/src/main/res/drawable/cache_cleared_day.xml +++ b/app/src/main/res/drawable/clear_cache_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/cookies_warning.xml b/app/src/main/res/drawable/clear_cookies_disabled.xml similarity index 100% rename from app/src/main/res/drawable/cookies_warning.xml rename to app/src/main/res/drawable/clear_cookies_disabled.xml diff --git a/app/src/main/res/drawable/cookies_cleared_day.xml b/app/src/main/res/drawable/clear_cookies_enabled.xml similarity index 95% rename from app/src/main/res/drawable/cookies_cleared_day.xml rename to app/src/main/res/drawable/clear_cookies_enabled.xml index 5c43795a..6ff2175d 100644 --- a/app/src/main/res/drawable/cookies_cleared_day.xml +++ b/app/src/main/res/drawable/clear_cookies_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/dom_storage_warning.xml b/app/src/main/res/drawable/clear_dom_storage_disabled.xml similarity index 100% rename from app/src/main/res/drawable/dom_storage_warning.xml rename to app/src/main/res/drawable/clear_dom_storage_disabled.xml diff --git a/app/src/main/res/drawable/dom_storage_disabled_night.xml b/app/src/main/res/drawable/clear_dom_storage_enabled.xml similarity index 91% rename from app/src/main/res/drawable/dom_storage_disabled_night.xml rename to app/src/main/res/drawable/clear_dom_storage_enabled.xml index cb60ee03..f74303c5 100644 --- a/app/src/main/res/drawable/dom_storage_disabled_night.xml +++ b/app/src/main/res/drawable/clear_dom_storage_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > - + \ No newline at end of file diff --git a/app/src/main/res/drawable/clear_everything_enabled_day.xml b/app/src/main/res/drawable/clear_everything_enabled.xml similarity index 93% rename from app/src/main/res/drawable/clear_everything_enabled_day.xml rename to app/src/main/res/drawable/clear_everything_enabled.xml index 51ec65e3..2815d71e 100644 --- a/app/src/main/res/drawable/clear_everything_enabled_day.xml +++ b/app/src/main/res/drawable/clear_everything_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > diff --git a/app/src/main/res/drawable/clear_everything_enabled_night.xml b/app/src/main/res/drawable/clear_everything_enabled_night.xml deleted file mode 100644 index 588c68d5..00000000 --- a/app/src/main/res/drawable/clear_everything_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/form_data_warning.xml b/app/src/main/res/drawable/clear_form_data_disabled.xml similarity index 100% rename from app/src/main/res/drawable/form_data_warning.xml rename to app/src/main/res/drawable/clear_form_data_disabled.xml diff --git a/app/src/main/res/drawable/form_data_disabled_day.xml b/app/src/main/res/drawable/clear_form_data_enabled.xml similarity index 92% rename from app/src/main/res/drawable/form_data_disabled_day.xml rename to app/src/main/res/drawable/clear_form_data_enabled.xml index eb06b7d3..f647442d 100644 --- a/app/src/main/res/drawable/form_data_disabled_day.xml +++ b/app/src/main/res/drawable/clear_form_data_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/bug_warning.xml b/app/src/main/res/drawable/clear_logcat_disabled.xml similarity index 100% rename from app/src/main/res/drawable/bug_warning.xml rename to app/src/main/res/drawable/clear_logcat_disabled.xml diff --git a/app/src/main/res/drawable/bug.xml b/app/src/main/res/drawable/clear_logcat_enabled.xml similarity index 94% rename from app/src/main/res/drawable/bug.xml rename to app/src/main/res/drawable/clear_logcat_enabled.xml index 4d9f8602..3e6f83b4 100644 --- a/app/src/main/res/drawable/bug.xml +++ b/app/src/main/res/drawable/clear_logcat_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > \ No newline at end of file diff --git a/app/src/main/res/drawable/close_day.xml b/app/src/main/res/drawable/close.xml similarity index 92% rename from app/src/main/res/drawable/close_day.xml rename to app/src/main/res/drawable/close.xml index 74c73765..5620750c 100644 --- a/app/src/main/res/drawable/close_day.xml +++ b/app/src/main/res/drawable/close.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > diff --git a/app/src/main/res/drawable/close_blue_day.xml b/app/src/main/res/drawable/close_blue.xml similarity index 89% rename from app/src/main/res/drawable/close_blue_day.xml rename to app/src/main/res/drawable/close_blue.xml index 306198ba..7533be84 100644 --- a/app/src/main/res/drawable/close_blue_day.xml +++ b/app/src/main/res/drawable/close_blue.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > - + \ No newline at end of file diff --git a/app/src/main/res/drawable/close_blue_night.xml b/app/src/main/res/drawable/close_blue_night.xml deleted file mode 100644 index ab408f14..00000000 --- a/app/src/main/res/drawable/close_blue_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/close_night.xml b/app/src/main/res/drawable/close_night.xml deleted file mode 100644 index a4ffd37a..00000000 --- a/app/src/main/res/drawable/close_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/cookies_cleared_night.xml b/app/src/main/res/drawable/cookies_disabled.xml similarity index 95% rename from app/src/main/res/drawable/cookies_cleared_night.xml rename to app/src/main/res/drawable/cookies_disabled.xml index ff2d647f..16200d34 100644 --- a/app/src/main/res/drawable/cookies_cleared_night.xml +++ b/app/src/main/res/drawable/cookies_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/cookies_disabled_day.xml b/app/src/main/res/drawable/cookies_disabled_day.xml deleted file mode 100644 index 4fd1d8ed..00000000 --- a/app/src/main/res/drawable/cookies_disabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/cookies_disabled_night.xml b/app/src/main/res/drawable/cookies_disabled_night.xml deleted file mode 100644 index 9c91a302..00000000 --- a/app/src/main/res/drawable/cookies_disabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/copy_night.xml b/app/src/main/res/drawable/copy.xml similarity index 93% rename from app/src/main/res/drawable/copy_night.xml rename to app/src/main/res/drawable/copy.xml index b7c930b4..3347c08b 100644 --- a/app/src/main/res/drawable/copy_night.xml +++ b/app/src/main/res/drawable/copy.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/copy_day.xml b/app/src/main/res/drawable/copy_day.xml deleted file mode 100644 index d55e7418..00000000 --- a/app/src/main/res/drawable/copy_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/copy_enabled_day.xml b/app/src/main/res/drawable/copy_enabled_day.xml deleted file mode 100644 index 2eb0fc8b..00000000 --- a/app/src/main/res/drawable/copy_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/copy_enabled_night.xml b/app/src/main/res/drawable/copy_enabled_night.xml deleted file mode 100644 index dc41926a..00000000 --- a/app/src/main/res/drawable/copy_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/create_bookmark.xml b/app/src/main/res/drawable/create_bookmark.xml index 6e892fab..6e82716a 100644 --- a/app/src/main/res/drawable/create_bookmark.xml +++ b/app/src/main/res/drawable/create_bookmark.xml @@ -28,4 +28,4 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/create_folder.xml b/app/src/main/res/drawable/create_folder.xml index cbe051b9..451d5e84 100644 --- a/app/src/main/res/drawable/create_folder.xml +++ b/app/src/main/res/drawable/create_folder.xml @@ -11,4 +11,4 @@ - + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_user_agent_enabled_day.xml b/app/src/main/res/drawable/custom_user_agent_enabled.xml similarity index 93% rename from app/src/main/res/drawable/custom_user_agent_enabled_day.xml rename to app/src/main/res/drawable/custom_user_agent_enabled.xml index 940fde6a..abbadad6 100644 --- a/app/src/main/res/drawable/custom_user_agent_enabled_day.xml +++ b/app/src/main/res/drawable/custom_user_agent_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > - + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_user_agent_enabled_night.xml b/app/src/main/res/drawable/custom_user_agent_ghosted.xml similarity index 92% rename from app/src/main/res/drawable/custom_user_agent_enabled_night.xml rename to app/src/main/res/drawable/custom_user_agent_ghosted.xml index 19fe9d6f..b0fa318e 100644 --- a/app/src/main/res/drawable/custom_user_agent_enabled_night.xml +++ b/app/src/main/res/drawable/custom_user_agent_ghosted.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > - + \ No newline at end of file diff --git a/app/src/main/res/drawable/custom_user_agent_ghosted_day.xml b/app/src/main/res/drawable/custom_user_agent_ghosted_day.xml deleted file mode 100644 index dc3c6a8f..00000000 --- a/app/src/main/res/drawable/custom_user_agent_ghosted_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/custom_user_agent_ghosted_night.xml b/app/src/main/res/drawable/custom_user_agent_ghosted_night.xml deleted file mode 100644 index 760c7cc2..00000000 --- a/app/src/main/res/drawable/custom_user_agent_ghosted_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/delete_day.xml b/app/src/main/res/drawable/delete_enabled.xml similarity index 91% rename from app/src/main/res/drawable/delete_day.xml rename to app/src/main/res/drawable/delete_enabled.xml index a2b73dde..323569d7 100644 --- a/app/src/main/res/drawable/delete_day.xml +++ b/app/src/main/res/drawable/delete_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/delete_night.xml b/app/src/main/res/drawable/delete_night.xml deleted file mode 100644 index c909d30a..00000000 --- a/app/src/main/res/drawable/delete_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/dom_storage_cleared_day.xml b/app/src/main/res/drawable/dom_storage_cleared_day.xml deleted file mode 100644 index 6af9fa08..00000000 --- a/app/src/main/res/drawable/dom_storage_cleared_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/dom_storage_disabled_day.xml b/app/src/main/res/drawable/dom_storage_disabled.xml similarity index 92% rename from app/src/main/res/drawable/dom_storage_disabled_day.xml rename to app/src/main/res/drawable/dom_storage_disabled.xml index 145ba997..2c24e98b 100644 --- a/app/src/main/res/drawable/dom_storage_disabled_day.xml +++ b/app/src/main/res/drawable/dom_storage_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > diff --git a/app/src/main/res/drawable/dom_storage_cleared_night.xml b/app/src/main/res/drawable/dom_storage_ghosted.xml similarity index 92% rename from app/src/main/res/drawable/dom_storage_cleared_night.xml rename to app/src/main/res/drawable/dom_storage_ghosted.xml index b5f8202f..9f380132 100644 --- a/app/src/main/res/drawable/dom_storage_cleared_night.xml +++ b/app/src/main/res/drawable/dom_storage_ghosted.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > diff --git a/app/src/main/res/drawable/dom_storage_ghosted_day.xml b/app/src/main/res/drawable/dom_storage_ghosted_day.xml deleted file mode 100644 index 5215d138..00000000 --- a/app/src/main/res/drawable/dom_storage_ghosted_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/dom_storage_ghosted_night.xml b/app/src/main/res/drawable/dom_storage_ghosted_night.xml deleted file mode 100644 index 3e57af1a..00000000 --- a/app/src/main/res/drawable/dom_storage_ghosted_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/url_bar_background_dark_blue.xml b/app/src/main/res/drawable/domain_settings_url_background.xml similarity index 93% rename from app/src/main/res/drawable/url_bar_background_dark_blue.xml rename to app/src/main/res/drawable/domain_settings_url_background.xml index 90a8efd1..cef941fd 100644 --- a/app/src/main/res/drawable/url_bar_background_dark_blue.xml +++ b/app/src/main/res/drawable/domain_settings_url_background.xml @@ -21,9 +21,8 @@ - + android:color="@color/domain_settings_url_background" /> diff --git a/app/src/main/res/drawable/domains_day.xml b/app/src/main/res/drawable/domains.xml similarity index 93% rename from app/src/main/res/drawable/domains_day.xml rename to app/src/main/res/drawable/domains.xml index 75aba930..78af485c 100644 --- a/app/src/main/res/drawable/domains_day.xml +++ b/app/src/main/res/drawable/domains.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > - + \ No newline at end of file diff --git a/app/src/main/res/drawable/domains_night.xml b/app/src/main/res/drawable/domains_night.xml deleted file mode 100644 index b9a481be..00000000 --- a/app/src/main/res/drawable/domains_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/downloads_enabled_day.xml b/app/src/main/res/drawable/download.xml similarity index 90% rename from app/src/main/res/drawable/downloads_enabled_day.xml rename to app/src/main/res/drawable/download.xml index 22c1f08d..1a9f35ef 100644 --- a/app/src/main/res/drawable/downloads_enabled_day.xml +++ b/app/src/main/res/drawable/download.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/download_with_external_app_disabled_night.xml b/app/src/main/res/drawable/download_with_external_app_disabled.xml similarity index 94% rename from app/src/main/res/drawable/download_with_external_app_disabled_night.xml rename to app/src/main/res/drawable/download_with_external_app_disabled.xml index b0dd8cf7..1811e120 100644 --- a/app/src/main/res/drawable/download_with_external_app_disabled_night.xml +++ b/app/src/main/res/drawable/download_with_external_app_disabled.xml @@ -27,10 +27,10 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/download_with_external_app_disabled_day.xml b/app/src/main/res/drawable/download_with_external_app_enabled.xml similarity index 94% rename from app/src/main/res/drawable/download_with_external_app_disabled_day.xml rename to app/src/main/res/drawable/download_with_external_app_enabled.xml index eaf883ed..b342e8da 100644 --- a/app/src/main/res/drawable/download_with_external_app_disabled_day.xml +++ b/app/src/main/res/drawable/download_with_external_app_enabled.xml @@ -27,10 +27,10 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/download_with_external_app_enabled_day.xml b/app/src/main/res/drawable/download_with_external_app_enabled_day.xml deleted file mode 100644 index fd944726..00000000 --- a/app/src/main/res/drawable/download_with_external_app_enabled_day.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/download_with_external_app_enabled_night.xml b/app/src/main/res/drawable/download_with_external_app_enabled_night.xml deleted file mode 100644 index 60c690b2..00000000 --- a/app/src/main/res/drawable/download_with_external_app_enabled_night.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/downloads_enabled_night.xml b/app/src/main/res/drawable/downloads_enabled_night.xml deleted file mode 100644 index 8f8d9f8c..00000000 --- a/app/src/main/res/drawable/downloads_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/edit_night.xml b/app/src/main/res/drawable/edit.xml similarity index 93% rename from app/src/main/res/drawable/edit_night.xml rename to app/src/main/res/drawable/edit.xml index 57be2b2c..937dadb6 100644 --- a/app/src/main/res/drawable/edit_night.xml +++ b/app/src/main/res/drawable/edit.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > diff --git a/app/src/main/res/drawable/edit_day.xml b/app/src/main/res/drawable/edit_day.xml deleted file mode 100644 index 5468c706..00000000 --- a/app/src/main/res/drawable/edit_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/font_size_day.xml b/app/src/main/res/drawable/font_size.xml similarity index 91% rename from app/src/main/res/drawable/font_size_day.xml rename to app/src/main/res/drawable/font_size.xml index af023a46..f2f12987 100644 --- a/app/src/main/res/drawable/font_size_day.xml +++ b/app/src/main/res/drawable/font_size.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/font_size_night.xml b/app/src/main/res/drawable/font_size_night.xml deleted file mode 100644 index a27a9403..00000000 --- a/app/src/main/res/drawable/font_size_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/form_data_cleared_day.xml b/app/src/main/res/drawable/form_data_cleared_day.xml deleted file mode 100644 index 84b3941c..00000000 --- a/app/src/main/res/drawable/form_data_cleared_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/form_data_cleared_night.xml b/app/src/main/res/drawable/form_data_disabled.xml similarity index 92% rename from app/src/main/res/drawable/form_data_cleared_night.xml rename to app/src/main/res/drawable/form_data_disabled.xml index 1dd81cfd..80b3a806 100644 --- a/app/src/main/res/drawable/form_data_cleared_night.xml +++ b/app/src/main/res/drawable/form_data_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/form_data_disabled_night.xml b/app/src/main/res/drawable/form_data_disabled_night.xml deleted file mode 100644 index 5cb67a29..00000000 --- a/app/src/main/res/drawable/form_data_disabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/full_screen_disabled_night.xml b/app/src/main/res/drawable/full_screen_disabled.xml similarity index 91% rename from app/src/main/res/drawable/full_screen_disabled_night.xml rename to app/src/main/res/drawable/full_screen_disabled.xml index 790a2b13..4360947d 100644 --- a/app/src/main/res/drawable/full_screen_disabled_night.xml +++ b/app/src/main/res/drawable/full_screen_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/full_screen_disabled_day.xml b/app/src/main/res/drawable/full_screen_enabled.xml similarity index 91% rename from app/src/main/res/drawable/full_screen_disabled_day.xml rename to app/src/main/res/drawable/full_screen_enabled.xml index 6499b324..f9bf574d 100644 --- a/app/src/main/res/drawable/full_screen_disabled_day.xml +++ b/app/src/main/res/drawable/full_screen_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/full_screen_enabled_day.xml b/app/src/main/res/drawable/full_screen_enabled_day.xml deleted file mode 100644 index 77934475..00000000 --- a/app/src/main/res/drawable/full_screen_enabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/full_screen_enabled_night.xml b/app/src/main/res/drawable/full_screen_enabled_night.xml deleted file mode 100644 index 16e93f0b..00000000 --- a/app/src/main/res/drawable/full_screen_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/home_enabled_day.xml b/app/src/main/res/drawable/home.xml similarity index 90% rename from app/src/main/res/drawable/home_enabled_day.xml rename to app/src/main/res/drawable/home.xml index 9c49f16d..b79118f7 100644 --- a/app/src/main/res/drawable/home_enabled_day.xml +++ b/app/src/main/res/drawable/home.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/home_enabled_night.xml b/app/src/main/res/drawable/home_enabled_night.xml deleted file mode 100644 index 7c6a628b..00000000 --- a/app/src/main/res/drawable/home_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/images_options_night.xml b/app/src/main/res/drawable/image.xml similarity index 92% rename from app/src/main/res/drawable/images_options_night.xml rename to app/src/main/res/drawable/image.xml index 72d1dd1d..6e8357b5 100644 --- a/app/src/main/res/drawable/images_options_night.xml +++ b/app/src/main/res/drawable/image.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/images_enabled_day.xml b/app/src/main/res/drawable/images_disabled.xml similarity index 91% rename from app/src/main/res/drawable/images_enabled_day.xml rename to app/src/main/res/drawable/images_disabled.xml index 33ec02df..7c087f63 100644 --- a/app/src/main/res/drawable/images_enabled_day.xml +++ b/app/src/main/res/drawable/images_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/images_disabled_day.xml b/app/src/main/res/drawable/images_disabled_day.xml deleted file mode 100644 index 2a4065f9..00000000 --- a/app/src/main/res/drawable/images_disabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/images_disabled_night.xml b/app/src/main/res/drawable/images_enabled.xml similarity index 92% rename from app/src/main/res/drawable/images_disabled_night.xml rename to app/src/main/res/drawable/images_enabled.xml index ca29be62..daac5fd7 100644 --- a/app/src/main/res/drawable/images_disabled_night.xml +++ b/app/src/main/res/drawable/images_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/images_enabled_night.xml b/app/src/main/res/drawable/images_enabled_night.xml deleted file mode 100644 index a74463a6..00000000 --- a/app/src/main/res/drawable/images_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/images_options_day.xml b/app/src/main/res/drawable/images_options_day.xml deleted file mode 100644 index 3ae3520a..00000000 --- a/app/src/main/res/drawable/images_options_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/incognito_mode_disabled_night.xml b/app/src/main/res/drawable/incognito_mode_disabled.xml similarity index 95% rename from app/src/main/res/drawable/incognito_mode_disabled_night.xml rename to app/src/main/res/drawable/incognito_mode_disabled.xml index 847ba955..f73a2294 100644 --- a/app/src/main/res/drawable/incognito_mode_disabled_night.xml +++ b/app/src/main/res/drawable/incognito_mode_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/incognito_mode_disabled_day.xml b/app/src/main/res/drawable/incognito_mode_enabled.xml similarity index 95% rename from app/src/main/res/drawable/incognito_mode_disabled_day.xml rename to app/src/main/res/drawable/incognito_mode_enabled.xml index 52d78302..61f88e6b 100644 --- a/app/src/main/res/drawable/incognito_mode_disabled_day.xml +++ b/app/src/main/res/drawable/incognito_mode_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/incognito_mode_enabled_day.xml b/app/src/main/res/drawable/incognito_mode_enabled_day.xml deleted file mode 100644 index 0aaae9d5..00000000 --- a/app/src/main/res/drawable/incognito_mode_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/incognito_mode_enabled_night.xml b/app/src/main/res/drawable/incognito_mode_enabled_night.xml deleted file mode 100644 index 82516d13..00000000 --- a/app/src/main/res/drawable/incognito_mode_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/lock_day.xml b/app/src/main/res/drawable/lock.xml similarity index 93% rename from app/src/main/res/drawable/lock_day.xml rename to app/src/main/res/drawable/lock.xml index 4e1e6318..cc00ae00 100644 --- a/app/src/main/res/drawable/lock_day.xml +++ b/app/src/main/res/drawable/lock.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/lock_night.xml b/app/src/main/res/drawable/lock_night.xml deleted file mode 100644 index a0ea119d..00000000 --- a/app/src/main/res/drawable/lock_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/modify_url_disabled_night.xml b/app/src/main/res/drawable/modify_url_disabled.xml similarity index 93% rename from app/src/main/res/drawable/modify_url_disabled_night.xml rename to app/src/main/res/drawable/modify_url_disabled.xml index 4ec6850c..dd8deb6b 100644 --- a/app/src/main/res/drawable/modify_url_disabled_night.xml +++ b/app/src/main/res/drawable/modify_url_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/modify_url_disabled_day.xml b/app/src/main/res/drawable/modify_url_enabled.xml similarity index 94% rename from app/src/main/res/drawable/modify_url_disabled_day.xml rename to app/src/main/res/drawable/modify_url_enabled.xml index 7599b518..b96b2e6d 100644 --- a/app/src/main/res/drawable/modify_url_disabled_day.xml +++ b/app/src/main/res/drawable/modify_url_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/modify_url_enabled_day.xml b/app/src/main/res/drawable/modify_url_enabled_day.xml deleted file mode 100644 index e1ebdce0..00000000 --- a/app/src/main/res/drawable/modify_url_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/modify_url_enabled_night.xml b/app/src/main/res/drawable/modify_url_enabled_night.xml deleted file mode 100644 index 4df75f32..00000000 --- a/app/src/main/res/drawable/modify_url_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/more_disabled_night.xml b/app/src/main/res/drawable/more_disabled.xml similarity index 94% rename from app/src/main/res/drawable/more_disabled_night.xml rename to app/src/main/res/drawable/more_disabled.xml index d789db2e..8aa482ed 100644 --- a/app/src/main/res/drawable/more_disabled_night.xml +++ b/app/src/main/res/drawable/more_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/more_disabled_day.xml b/app/src/main/res/drawable/more_enabled.xml similarity index 94% rename from app/src/main/res/drawable/more_disabled_day.xml rename to app/src/main/res/drawable/more_enabled.xml index d0d9e8c8..0a591973 100644 --- a/app/src/main/res/drawable/more_disabled_day.xml +++ b/app/src/main/res/drawable/more_enabled.xml @@ -3,12 +3,12 @@ \ No newline at end of file diff --git a/app/src/main/res/drawable/more_enabled_day.xml b/app/src/main/res/drawable/more_enabled_day.xml deleted file mode 100644 index 2746e9aa..00000000 --- a/app/src/main/res/drawable/more_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/more_enabled_night.xml b/app/src/main/res/drawable/more_enabled_night.xml deleted file mode 100644 index c59a23ce..00000000 --- a/app/src/main/res/drawable/more_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/move_down_enabled_night.xml b/app/src/main/res/drawable/move_down_enabled.xml similarity index 91% rename from app/src/main/res/drawable/move_down_enabled_night.xml rename to app/src/main/res/drawable/move_down_enabled.xml index dfef744c..8febea70 100644 --- a/app/src/main/res/drawable/move_down_enabled_night.xml +++ b/app/src/main/res/drawable/move_down_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24.0" > \ No newline at end of file diff --git a/app/src/main/res/drawable/move_down_enabled_day.xml b/app/src/main/res/drawable/move_down_enabled_day.xml deleted file mode 100644 index 07fb9494..00000000 --- a/app/src/main/res/drawable/move_down_enabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/move_to_folder_night.xml b/app/src/main/res/drawable/move_to_folder.xml similarity index 97% rename from app/src/main/res/drawable/move_to_folder_night.xml rename to app/src/main/res/drawable/move_to_folder.xml index f3bfa6f2..b9568180 100644 --- a/app/src/main/res/drawable/move_to_folder_night.xml +++ b/app/src/main/res/drawable/move_to_folder.xml @@ -27,6 +27,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/move_to_folder_day.xml b/app/src/main/res/drawable/move_to_folder_blue.xml similarity index 97% rename from app/src/main/res/drawable/move_to_folder_day.xml rename to app/src/main/res/drawable/move_to_folder_blue.xml index 64abcce9..59235795 100644 --- a/app/src/main/res/drawable/move_to_folder_day.xml +++ b/app/src/main/res/drawable/move_to_folder_blue.xml @@ -27,6 +27,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/move_to_folder_blue_day.xml b/app/src/main/res/drawable/move_to_folder_blue_day.xml deleted file mode 100644 index 8ff2f4e3..00000000 --- a/app/src/main/res/drawable/move_to_folder_blue_day.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/move_to_folder_blue_night.xml b/app/src/main/res/drawable/move_to_folder_blue_night.xml deleted file mode 100644 index 43bbfc65..00000000 --- a/app/src/main/res/drawable/move_to_folder_blue_night.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/move_up_enabled_night.xml b/app/src/main/res/drawable/move_up_enabled.xml similarity index 91% rename from app/src/main/res/drawable/move_up_enabled_night.xml rename to app/src/main/res/drawable/move_up_enabled.xml index 55134e93..2cb79084 100644 --- a/app/src/main/res/drawable/move_up_enabled_night.xml +++ b/app/src/main/res/drawable/move_up_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/move_up_enabled_day.xml b/app/src/main/res/drawable/move_up_enabled_day.xml deleted file mode 100644 index 757c6138..00000000 --- a/app/src/main/res/drawable/move_up_enabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/proxy_enabled_day.xml b/app/src/main/res/drawable/proxy_disabled.xml similarity index 91% rename from app/src/main/res/drawable/proxy_enabled_day.xml rename to app/src/main/res/drawable/proxy_disabled.xml index 42f66df3..9d086629 100644 --- a/app/src/main/res/drawable/proxy_enabled_day.xml +++ b/app/src/main/res/drawable/proxy_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/proxy_disabled_day.xml b/app/src/main/res/drawable/proxy_enabled.xml similarity index 92% rename from app/src/main/res/drawable/proxy_disabled_day.xml rename to app/src/main/res/drawable/proxy_enabled.xml index 3c3892ac..8506c902 100644 --- a/app/src/main/res/drawable/proxy_disabled_day.xml +++ b/app/src/main/res/drawable/proxy_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/proxy_enabled_night.xml b/app/src/main/res/drawable/proxy_enabled_night.xml deleted file mode 100644 index 2a6f5a86..00000000 --- a/app/src/main/res/drawable/proxy_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/proxy_disabled_night.xml b/app/src/main/res/drawable/proxy_ghosted.xml similarity index 91% rename from app/src/main/res/drawable/proxy_disabled_night.xml rename to app/src/main/res/drawable/proxy_ghosted.xml index b8b65cf2..b1fa71a9 100644 --- a/app/src/main/res/drawable/proxy_disabled_night.xml +++ b/app/src/main/res/drawable/proxy_ghosted.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/proxy_ghosted_day.xml b/app/src/main/res/drawable/proxy_ghosted_day.xml deleted file mode 100644 index 7d455a5d..00000000 --- a/app/src/main/res/drawable/proxy_ghosted_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/proxy_ghosted_night.xml b/app/src/main/res/drawable/proxy_ghosted_night.xml deleted file mode 100644 index 54b9ae98..00000000 --- a/app/src/main/res/drawable/proxy_ghosted_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/refresh_disabled_night.xml b/app/src/main/res/drawable/refresh_disabled.xml similarity index 92% rename from app/src/main/res/drawable/refresh_disabled_night.xml rename to app/src/main/res/drawable/refresh_disabled.xml index 11807de8..c5605c15 100644 --- a/app/src/main/res/drawable/refresh_disabled_night.xml +++ b/app/src/main/res/drawable/refresh_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/refresh_disabled_day.xml b/app/src/main/res/drawable/refresh_enabled.xml similarity index 93% rename from app/src/main/res/drawable/refresh_disabled_day.xml rename to app/src/main/res/drawable/refresh_enabled.xml index 2a01258e..af1b49df 100644 --- a/app/src/main/res/drawable/refresh_disabled_day.xml +++ b/app/src/main/res/drawable/refresh_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/refresh_enabled_day.xml b/app/src/main/res/drawable/refresh_enabled_day.xml deleted file mode 100644 index f10ba149..00000000 --- a/app/src/main/res/drawable/refresh_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/refresh_enabled_night.xml b/app/src/main/res/drawable/refresh_enabled_night.xml deleted file mode 100644 index 64e9f2d3..00000000 --- a/app/src/main/res/drawable/refresh_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/save_night.xml b/app/src/main/res/drawable/save.xml similarity index 93% rename from app/src/main/res/drawable/save_night.xml rename to app/src/main/res/drawable/save.xml index 51f7a8fb..ba36f8ab 100644 --- a/app/src/main/res/drawable/save_night.xml +++ b/app/src/main/res/drawable/save.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/save_day.xml b/app/src/main/res/drawable/save_day.xml deleted file mode 100644 index 2efb95f6..00000000 --- a/app/src/main/res/drawable/save_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/save_text_night.xml b/app/src/main/res/drawable/save_text.xml similarity index 93% rename from app/src/main/res/drawable/save_text_night.xml rename to app/src/main/res/drawable/save_text.xml index 15916704..b6fc4954 100644 --- a/app/src/main/res/drawable/save_text_night.xml +++ b/app/src/main/res/drawable/save_text.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/save_text_day.xml b/app/src/main/res/drawable/save_text_day.xml deleted file mode 100644 index c3f69494..00000000 --- a/app/src/main/res/drawable/save_text_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/search_enabled_day.xml b/app/src/main/res/drawable/search.xml similarity index 93% rename from app/src/main/res/drawable/search_enabled_day.xml rename to app/src/main/res/drawable/search.xml index 62fd58fb..d95d178b 100644 --- a/app/src/main/res/drawable/search_enabled_day.xml +++ b/app/src/main/res/drawable/search.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/search_custom_url_enabled_day.xml b/app/src/main/res/drawable/search_custom_enabled.xml similarity index 94% rename from app/src/main/res/drawable/search_custom_url_enabled_day.xml rename to app/src/main/res/drawable/search_custom_enabled.xml index 3cf248fc..044be8b4 100644 --- a/app/src/main/res/drawable/search_custom_url_enabled_day.xml +++ b/app/src/main/res/drawable/search_custom_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/search_custom_url_enabled_night.xml b/app/src/main/res/drawable/search_custom_ghosted.xml similarity index 93% rename from app/src/main/res/drawable/search_custom_url_enabled_night.xml rename to app/src/main/res/drawable/search_custom_ghosted.xml index ad920818..f502ec62 100644 --- a/app/src/main/res/drawable/search_custom_url_enabled_night.xml +++ b/app/src/main/res/drawable/search_custom_ghosted.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/search_custom_url_ghosted_day.xml b/app/src/main/res/drawable/search_custom_url_ghosted_day.xml deleted file mode 100644 index 0e5d03b4..00000000 --- a/app/src/main/res/drawable/search_custom_url_ghosted_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/search_custom_url_ghosted_night.xml b/app/src/main/res/drawable/search_custom_url_ghosted_night.xml deleted file mode 100644 index bc93bab1..00000000 --- a/app/src/main/res/drawable/search_custom_url_ghosted_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/search_enabled_night.xml b/app/src/main/res/drawable/search_enabled_night.xml deleted file mode 100644 index 0ca7bb57..00000000 --- a/app/src/main/res/drawable/search_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/select_all_night.xml b/app/src/main/res/drawable/select_all.xml similarity index 94% rename from app/src/main/res/drawable/select_all_night.xml rename to app/src/main/res/drawable/select_all.xml index 948ad226..407b6d43 100644 --- a/app/src/main/res/drawable/select_all_night.xml +++ b/app/src/main/res/drawable/select_all.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/select_all_day.xml b/app/src/main/res/drawable/select_all_day.xml deleted file mode 100644 index ce3ab591..00000000 --- a/app/src/main/res/drawable/select_all_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/share_night.xml b/app/src/main/res/drawable/share.xml similarity index 95% rename from app/src/main/res/drawable/share_night.xml rename to app/src/main/res/drawable/share.xml index afefb749..c7ecf1dc 100644 --- a/app/src/main/res/drawable/share_night.xml +++ b/app/src/main/res/drawable/share.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/share_day.xml b/app/src/main/res/drawable/share_day.xml deleted file mode 100644 index b092806a..00000000 --- a/app/src/main/res/drawable/share_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/social_media_enabled_day.xml b/app/src/main/res/drawable/social_media_disabled.xml similarity index 94% rename from app/src/main/res/drawable/social_media_enabled_day.xml rename to app/src/main/res/drawable/social_media_disabled.xml index e503ad42..e9ab4981 100644 --- a/app/src/main/res/drawable/social_media_enabled_day.xml +++ b/app/src/main/res/drawable/social_media_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/social_media_disabled_day.xml b/app/src/main/res/drawable/social_media_enabled.xml similarity index 95% rename from app/src/main/res/drawable/social_media_disabled_day.xml rename to app/src/main/res/drawable/social_media_enabled.xml index e84b59c9..cc414c9a 100644 --- a/app/src/main/res/drawable/social_media_disabled_day.xml +++ b/app/src/main/res/drawable/social_media_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/social_media_enabled_night.xml b/app/src/main/res/drawable/social_media_enabled_night.xml deleted file mode 100644 index 650cf7fc..00000000 --- a/app/src/main/res/drawable/social_media_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/social_media_disabled_night.xml b/app/src/main/res/drawable/social_media_ghosted.xml similarity index 94% rename from app/src/main/res/drawable/social_media_disabled_night.xml rename to app/src/main/res/drawable/social_media_ghosted.xml index c1dd3f6b..4ea2fed8 100644 --- a/app/src/main/res/drawable/social_media_disabled_night.xml +++ b/app/src/main/res/drawable/social_media_ghosted.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/social_media_ghosted_day.xml b/app/src/main/res/drawable/social_media_ghosted_day.xml deleted file mode 100644 index 767b83f7..00000000 --- a/app/src/main/res/drawable/social_media_ghosted_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/social_media_ghosted_night.xml b/app/src/main/res/drawable/social_media_ghosted_night.xml deleted file mode 100644 index 89ef71a8..00000000 --- a/app/src/main/res/drawable/social_media_ghosted_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/sort_night.xml b/app/src/main/res/drawable/sort.xml similarity index 91% rename from app/src/main/res/drawable/sort_night.xml rename to app/src/main/res/drawable/sort.xml index 67bf8c92..1552f811 100644 --- a/app/src/main/res/drawable/sort_night.xml +++ b/app/src/main/res/drawable/sort.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/sort_day.xml b/app/src/main/res/drawable/sort_day.xml deleted file mode 100644 index bc3a950f..00000000 --- a/app/src/main/res/drawable/sort_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/sort_selected_day.xml b/app/src/main/res/drawable/sort_selected.xml similarity index 93% rename from app/src/main/res/drawable/sort_selected_day.xml rename to app/src/main/res/drawable/sort_selected.xml index d5161a58..adc89251 100644 --- a/app/src/main/res/drawable/sort_selected_day.xml +++ b/app/src/main/res/drawable/sort_selected.xml @@ -27,10 +27,10 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/sort_selected_night.xml b/app/src/main/res/drawable/sort_selected_night.xml deleted file mode 100644 index 42bcac8a..00000000 --- a/app/src/main/res/drawable/sort_selected_night.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/ssl_certificate_disabled_night.xml b/app/src/main/res/drawable/ssl_certificate_disabled.xml similarity index 95% rename from app/src/main/res/drawable/ssl_certificate_disabled_night.xml rename to app/src/main/res/drawable/ssl_certificate_disabled.xml index 98ecd7c3..3f61a298 100644 --- a/app/src/main/res/drawable/ssl_certificate_disabled_night.xml +++ b/app/src/main/res/drawable/ssl_certificate_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/ssl_certificate_disabled_day.xml b/app/src/main/res/drawable/ssl_certificate_enabled.xml similarity index 95% rename from app/src/main/res/drawable/ssl_certificate_disabled_day.xml rename to app/src/main/res/drawable/ssl_certificate_enabled.xml index 057f7f8c..e9d2e50e 100644 --- a/app/src/main/res/drawable/ssl_certificate_disabled_day.xml +++ b/app/src/main/res/drawable/ssl_certificate_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/ssl_certificate_enabled_day.xml b/app/src/main/res/drawable/ssl_certificate_enabled_day.xml deleted file mode 100644 index ec23d27e..00000000 --- a/app/src/main/res/drawable/ssl_certificate_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/ssl_certificate_enabled_night.xml b/app/src/main/res/drawable/ssl_certificate_enabled_night.xml deleted file mode 100644 index 1dd53d31..00000000 --- a/app/src/main/res/drawable/ssl_certificate_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/tab_disabled_night.xml b/app/src/main/res/drawable/tab_disabled.xml similarity index 91% rename from app/src/main/res/drawable/tab_disabled_night.xml rename to app/src/main/res/drawable/tab_disabled.xml index f90ca12b..f77302bb 100644 --- a/app/src/main/res/drawable/tab_disabled_night.xml +++ b/app/src/main/res/drawable/tab_disabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/tab_disabled_day.xml b/app/src/main/res/drawable/tab_enabled.xml similarity index 92% rename from app/src/main/res/drawable/tab_disabled_day.xml rename to app/src/main/res/drawable/tab_enabled.xml index a72acd4f..bc01dfac 100644 --- a/app/src/main/res/drawable/tab_disabled_day.xml +++ b/app/src/main/res/drawable/tab_enabled.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/tab_enabled_day.xml b/app/src/main/res/drawable/tab_enabled_day.xml deleted file mode 100644 index 9addb85f..00000000 --- a/app/src/main/res/drawable/tab_enabled_day.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/tab_enabled_night.xml b/app/src/main/res/drawable/tab_enabled_night.xml deleted file mode 100644 index 459db641..00000000 --- a/app/src/main/res/drawable/tab_enabled_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/url_bar_background_light_green.xml b/app/src/main/res/drawable/url_bar_background_light_green.xml deleted file mode 100644 index fba5346f..00000000 --- a/app/src/main/res/drawable/url_bar_background_light_green.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/user_agent_day.xml b/app/src/main/res/drawable/user_agent.xml similarity index 94% rename from app/src/main/res/drawable/user_agent_day.xml rename to app/src/main/res/drawable/user_agent.xml index 5076ddff..84032b9a 100644 --- a/app/src/main/res/drawable/user_agent_day.xml +++ b/app/src/main/res/drawable/user_agent.xml @@ -9,6 +9,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/user_agent_night.xml b/app/src/main/res/drawable/user_agent_night.xml deleted file mode 100644 index 243312e0..00000000 --- a/app/src/main/res/drawable/user_agent_night.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/webview_dark_theme_night.xml b/app/src/main/res/drawable/webview_dark_theme.xml similarity index 96% rename from app/src/main/res/drawable/webview_dark_theme_night.xml rename to app/src/main/res/drawable/webview_dark_theme.xml index f71430d0..bce80597 100644 --- a/app/src/main/res/drawable/webview_dark_theme_night.xml +++ b/app/src/main/res/drawable/webview_dark_theme.xml @@ -27,6 +27,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/webview_dark_theme_day.xml b/app/src/main/res/drawable/webview_light_theme.xml similarity index 96% rename from app/src/main/res/drawable/webview_dark_theme_day.xml rename to app/src/main/res/drawable/webview_light_theme.xml index e5508798..8303ab79 100644 --- a/app/src/main/res/drawable/webview_dark_theme_day.xml +++ b/app/src/main/res/drawable/webview_light_theme.xml @@ -27,6 +27,6 @@ android:autoMirrored="true" > \ No newline at end of file diff --git a/app/src/main/res/drawable/webview_light_theme_day.xml b/app/src/main/res/drawable/webview_light_theme_day.xml deleted file mode 100644 index ae304aa5..00000000 --- a/app/src/main/res/drawable/webview_light_theme_day.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/webview_light_theme_night.xml b/app/src/main/res/drawable/webview_light_theme_night.xml deleted file mode 100644 index cd8e811b..00000000 --- a/app/src/main/res/drawable/webview_light_theme_night.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/wide_viewport_disabled_night.xml b/app/src/main/res/drawable/wide_viewport_disabled.xml similarity index 92% rename from app/src/main/res/drawable/wide_viewport_disabled_night.xml rename to app/src/main/res/drawable/wide_viewport_disabled.xml index 13c8a900..a56630cc 100644 --- a/app/src/main/res/drawable/wide_viewport_disabled_night.xml +++ b/app/src/main/res/drawable/wide_viewport_disabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/wide_viewport_disabled_day.xml b/app/src/main/res/drawable/wide_viewport_enabled.xml similarity index 93% rename from app/src/main/res/drawable/wide_viewport_disabled_day.xml rename to app/src/main/res/drawable/wide_viewport_enabled.xml index ed7cc2ce..94f74aae 100644 --- a/app/src/main/res/drawable/wide_viewport_disabled_day.xml +++ b/app/src/main/res/drawable/wide_viewport_enabled.xml @@ -8,6 +8,6 @@ android:viewportWidth="24" > \ No newline at end of file diff --git a/app/src/main/res/drawable/wide_viewport_enabled_day.xml b/app/src/main/res/drawable/wide_viewport_enabled_day.xml deleted file mode 100644 index 25e258c5..00000000 --- a/app/src/main/res/drawable/wide_viewport_enabled_day.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/wide_viewport_enabled_night.xml b/app/src/main/res/drawable/wide_viewport_enabled_night.xml deleted file mode 100644 index 5ce4d8ad..00000000 --- a/app/src/main/res/drawable/wide_viewport_enabled_night.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml b/app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml index 7df2e5da..eadc8c98 100644 --- a/app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml +++ b/app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml @@ -22,7 +22,6 @@ + android:contentDescription="@string/back" /> diff --git a/app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml b/app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml index 138ce0c0..911f0a6d 100644 --- a/app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml +++ b/app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml @@ -22,7 +22,6 @@ + android:contentDescription="@string/back" /> diff --git a/app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml b/app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml index dfce2177..7ba10280 100644 --- a/app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml +++ b/app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml @@ -21,7 +21,6 @@ + android:contentDescription="@string/back" /> diff --git a/app/src/main/res/layout/bookmarks_drawer_top_appbar.xml b/app/src/main/res/layout/bookmarks_drawer_top_appbar.xml index 7fbe9ea4..f4e37b27 100644 --- a/app/src/main/res/layout/bookmarks_drawer_top_appbar.xml +++ b/app/src/main/res/layout/bookmarks_drawer_top_appbar.xml @@ -21,7 +21,6 @@ + android:contentDescription="@string/back" /> diff --git a/app/src/main/res/layout/domain_settings_fragment.xml b/app/src/main/res/layout/domain_settings_fragment.xml index ed2c1fb7..48d3590d 100644 --- a/app/src/main/res/layout/domain_settings_fragment.xml +++ b/app/src/main/res/layout/domain_settings_fragment.xml @@ -52,7 +52,7 @@ android:layout_marginEnd="10dp" android:layout_marginBottom="12dp" android:layout_gravity="bottom" - android:src="@drawable/domains_day" + android:src="@drawable/domains" app:tint="?attr/domainSettingsIconTintColor" tools:ignore="contentDescription" /> @@ -397,7 +397,7 @@ android:layout_marginTop="1dp" android:layout_marginEnd="10dp" android:layout_gravity="center_vertical" - android:src="@drawable/user_agent_day" + android:src="@drawable/user_agent" app:tint="?attr/domainSettingsIconTintColor" android:contentDescription="@string/user_agent" /> @@ -445,7 +445,7 @@ android:layout_marginTop="1dp" android:layout_marginEnd="10dp" android:layout_gravity="center_vertical" - android:src="@drawable/font_size_day" + android:src="@drawable/font_size" app:tint="?attr/domainSettingsIconTintColor" android:contentDescription="@string/font_size" /> diff --git a/app/src/main/res/layout/main_framelayout_bottom_appbar.xml b/app/src/main/res/layout/main_framelayout_bottom_appbar.xml index eb8b6be8..694c810f 100644 --- a/app/src/main/res/layout/main_framelayout_bottom_appbar.xml +++ b/app/src/main/res/layout/main_framelayout_bottom_appbar.xml @@ -76,11 +76,10 @@ android:layout_gravity="center_vertical" android:paddingStart="10dp" android:paddingEnd="10dp" - android:src="@drawable/close_day" + android:src="@drawable/close" android:background="?attr/selectableItemBackground" android:onClick="closeTab" - android:contentDescription="@string/close_tab" - app:tint="?attr/addTabIconTintColor" /> + android:contentDescription="@string/close_tab" /> + android:contentDescription="@string/add_tab" /> @@ -164,7 +162,7 @@ + android:contentDescription="@string/close_tab" /> + android:contentDescription="@string/add_tab" /> diff --git a/app/src/main/res/menu/about_version_options_menu.xml b/app/src/main/res/menu/about_version_options_menu.xml index c36d31b0..d227eb18 100644 --- a/app/src/main/res/menu/about_version_options_menu.xml +++ b/app/src/main/res/menu/about_version_options_menu.xml @@ -22,35 +22,31 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - - - - \ No newline at end of file diff --git a/app/src/main/res/menu/bookmarks_context_menu.xml b/app/src/main/res/menu/bookmarks_context_menu.xml index 3ba57a94..cad87cbc 100644 --- a/app/src/main/res/menu/bookmarks_context_menu.xml +++ b/app/src/main/res/menu/bookmarks_context_menu.xml @@ -39,15 +39,14 @@ android:id="@+id/move_to_folder" android:title="@string/move_to_folder" android:orderInCategory="30" - android:icon="?attr/moveToFolderIcon" + android:icon="@drawable/move_to_folder" app:showAsAction="ifRoom" /> - @@ -55,14 +54,13 @@ android:id="@+id/delete_bookmark" android:title="@string/delete" android:orderInCategory="50" - android:icon="?attr/deleteIcon" + android:icon="@drawable/delete_enabled" app:showAsAction="ifRoom" /> - \ No newline at end of file diff --git a/app/src/main/res/menu/bookmarks_databaseview_context_menu.xml b/app/src/main/res/menu/bookmarks_databaseview_context_menu.xml index 0d6df1ea..0ba67159 100644 --- a/app/src/main/res/menu/bookmarks_databaseview_context_menu.xml +++ b/app/src/main/res/menu/bookmarks_databaseview_context_menu.xml @@ -22,18 +22,18 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - + \ No newline at end of file diff --git a/app/src/main/res/menu/bookmarks_databaseview_options_menu.xml b/app/src/main/res/menu/bookmarks_databaseview_options_menu.xml index 3ac18e82..8caf0870 100644 --- a/app/src/main/res/menu/bookmarks_databaseview_options_menu.xml +++ b/app/src/main/res/menu/bookmarks_databaseview_options_menu.xml @@ -22,11 +22,10 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" > - \ No newline at end of file diff --git a/app/src/main/res/menu/bookmarks_options_menu.xml b/app/src/main/res/menu/bookmarks_options_menu.xml index f4194b5a..2df1619d 100644 --- a/app/src/main/res/menu/bookmarks_options_menu.xml +++ b/app/src/main/res/menu/bookmarks_options_menu.xml @@ -22,12 +22,11 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - \ No newline at end of file diff --git a/app/src/main/res/menu/logcat_options_menu.xml b/app/src/main/res/menu/logcat_options_menu.xml index ba18c568..26e1d04f 100644 --- a/app/src/main/res/menu/logcat_options_menu.xml +++ b/app/src/main/res/menu/logcat_options_menu.xml @@ -22,27 +22,24 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" > - - - \ No newline at end of file diff --git a/app/src/main/res/menu/view_source_options_menu.xml b/app/src/main/res/menu/view_source_options_menu.xml index 76789a2c..0843e1f0 100644 --- a/app/src/main/res/menu/view_source_options_menu.xml +++ b/app/src/main/res/menu/view_source_options_menu.xml @@ -22,11 +22,11 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - + \ No newline at end of file diff --git a/app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml b/app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml index 74acc796..ccfafa14 100644 --- a/app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml +++ b/app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml @@ -22,7 +22,7 @@ @@ -63,13 +63,13 @@ @@ -78,7 +78,7 @@ @@ -111,7 +111,7 @@ \ No newline at end of file diff --git a/app/src/main/res/menu/webview_navigation_menu_top_appbar.xml b/app/src/main/res/menu/webview_navigation_menu_top_appbar.xml index 19e9ea4c..ff5debf0 100644 --- a/app/src/main/res/menu/webview_navigation_menu_top_appbar.xml +++ b/app/src/main/res/menu/webview_navigation_menu_top_appbar.xml @@ -23,7 +23,7 @@ @@ -31,7 +31,7 @@ @@ -64,13 +64,13 @@ @@ -79,7 +79,7 @@ @@ -112,7 +112,7 @@ \ No newline at end of file diff --git a/app/src/main/res/menu/webview_options_menu.xml b/app/src/main/res/menu/webview_options_menu.xml index a8e6fd12..dcebc2e3 100644 --- a/app/src/main/res/menu/webview_options_menu.xml +++ b/app/src/main/res/menu/webview_options_menu.xml @@ -37,12 +37,11 @@ android:orderInCategory="200" app:showAsAction="never" /> - @color/red_900 - @color/white @color/violet_500 @color/gray_875 @color/violet_500 @@ -46,23 +45,6 @@ @drawable/list_selector_night - - - @drawable/bookmarks_night - - - @drawable/about_night - @drawable/close_night - @drawable/copy_night - @drawable/delete_night - @drawable/edit_night - @drawable/move_to_folder_night - @drawable/save_night - @drawable/images_options_night - @drawable/save_text_night - @drawable/select_all_night - @drawable/share_night - @drawable/sort_night \ No newline at end of file diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 508a2079..027be952 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -21,7 +21,14 @@ @color/violet_700 + @color/violet_500 @color/violet_500 + @color/gray_500 + @color/gray_700 + @color/white + @color/dark_blue_40 + @color/red_900 + @color/gray_700 #66000000 diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml index b438b26f..77a3d1f6 100644 --- a/app/src/main/res/values-night/styles.xml +++ b/app/src/main/res/values-night/styles.xml @@ -35,7 +35,6 @@ @color/red_900 - @color/white @color/violet_500 @color/gray_875 @color/violet_500 @@ -44,23 +43,6 @@ @drawable/list_selector_night - - - @drawable/bookmarks_night - - - @drawable/about_night - @drawable/close_night - @drawable/copy_night - @drawable/delete_night - @drawable/edit_night - @drawable/move_to_folder_night - @drawable/save_night - @drawable/images_options_night - @drawable/save_text_night - @drawable/select_all_night - @drawable/share_night - @drawable/sort_night \ No newline at end of file diff --git a/app/src/main/res/values-v27/styles.xml b/app/src/main/res/values-v27/styles.xml index 76dd2474..e0010ebb 100644 --- a/app/src/main/res/values-v27/styles.xml +++ b/app/src/main/res/values-v27/styles.xml @@ -37,7 +37,6 @@ @color/red_a700 - @color/gray_925 @color/blue_800 @color/white @color/blue_800 @@ -46,23 +45,6 @@ @drawable/list_selector_day - - - @drawable/bookmarks_day - - - @drawable/about_day - @drawable/close_day - @drawable/copy_day - @drawable/delete_day - @drawable/edit_day - @drawable/move_to_folder_day - @drawable/save_day - @drawable/images_options_day - @drawable/save_text_day - @drawable/select_all_day - @drawable/share_day - @drawable/sort_day \ No newline at end of file diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 51435aa0..5331ec07 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -28,7 +28,6 @@ - @@ -37,38 +36,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d72b0417..3045569c 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -21,7 +21,14 @@ @color/blue_700 + @color/blue_800 @color/blue_700 + @color/gray_600 + @color/gray_425 + @color/gray_925 + @color/green_200 + @color/red_a700 + @color/gray_300 #66000000 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ee2af45c..4f19586a 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -35,7 +35,6 @@ @color/red_a700 - @color/gray_925 @color/blue_800 @color/white @color/blue_800 @@ -44,23 +43,6 @@ @drawable/list_selector_day - - - @drawable/bookmarks_day - - - @drawable/about_day - @drawable/close_day - @drawable/copy_day - @drawable/delete_day - @drawable/edit_day - @drawable/move_to_folder_day - @drawable/save_day - @drawable/images_options_day - @drawable/save_text_day - @drawable/select_all_day - @drawable/share_day - @drawable/sort_day \ No newline at end of file diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 4f3b1ff1..1bdbd183 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -54,7 +54,7 @@ android:entries="@array/translated_user_agent_names" android:entryValues="@array/user_agent_names" android:defaultValue="@string/user_agent_default_value" - android:icon="?attr/userAgentIcon" /> + android:icon="@drawable/user_agent" /> + android:icon="@drawable/search" /> + android:icon="@drawable/home" /> + android:icon="@drawable/font_size" /> + android:icon="@drawable/app_theme" />