+ // Set the `proxyThroughOrbotPreference` icon.
+ if (proxyThroughOrbotBoolean) {
+ proxyThroughOrbotPreference.setIcon(R.drawable.orbot_enabled);
+ } else {
+ proxyThroughOrbotPreference.setIcon(R.drawable.orbot_disabled);
+ }
+
+ // Set the `torSearchPreference` and `torSearchCustomURLPreference` icons.
+ if (proxyThroughOrbotBoolean) {
+ // Set the `torHomepagePreference` and `torSearchPreference` icons.
+ torHomepagePreference.setIcon(R.drawable.home_enabled);
+ torSearchPreference.setIcon(R.drawable.search_enabled);
+
+ // Set the `torSearchCustomURLPreference` icon.
+ if (torSearchCustomURLPreference.isEnabled()) {
+ torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled);
+ } else {
+ torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_disabled);
+ }
+ } else { // Proxy through Orbot is disabled.
+ torHomepagePreference.setIcon(R.drawable.home_ghosted);
+ torSearchPreference.setIcon(R.drawable.search_ghosted);
+ torSearchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted);
+ }
+
+ // Set the `searchCustomURLPreference` icon.
+ if (searchCustomURLPreference.isEnabled()) {
+ searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled);
+ } else {
+ searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted);
+ }
+
+ // Set the full screen browsing mode icons.
+ if (fullScreenBrowsingModeBoolean) {
+ // Set the `fullScreenBrowsingModePreference` icon.
+ fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled);
+
+ if (hideSystemBarsBoolean) {
+ // Set `hideSystemBarsPreference` to use the enabled icon.
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled);
+
+ // Set `translucentNavigationBarPreference` to use the ghosted icon.
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted);
+ } else { // `hideSystemBarsBoolean` is false.
+ // Set `hideSystemBarsPreference` to use the disabled icon.
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled);
+
+ // Set the correct icon for `translucentNavigationBarPreference`.
+ if (savedPreferences.getBoolean("translucent_navigation_bar", true)) {
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled);
+ } else {
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled);
+ }
+ }
+ } else { // `fullScreenBrowsingModeBoolean` is false.
+ fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled);
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted);
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted);
+ }
+
+ // Set the `swipeToRefreshPreference` icon.
+ if (savedPreferences.getBoolean("swipe_to_refresh", false)) {
+ swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled);
+ } else {
+ swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled);
+ }
+
+ // Set the `displayAdditionalAppBarIconsPreference` icon.
+ if (savedPreferences.getBoolean("display_additional_app_bar_icons", false)) {
+ displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled);
+ } else {
+ displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled);
+ }
+
+ // Set the `displayWebpageImagesPreference` icon.
+ if (savedPreferences.getBoolean("display_webpage_images", true)) {
+ displayWebpageImagesPreference.setIcon(R.drawable.images_enabled);
+ } else {
+ displayWebpageImagesPreference.setIcon(R.drawable.images_disabled);
+ }
+
+