+ case "search_custom_url":
+ // Set the new custom search URL as the summary text for `search_custom_url`. The default is `""`.
+ searchCustomURLPreference.setSummary(sharedPreferences.getString("search_custom_url", ""));
+ break;
+
+ case "full_screen_browsing_mode":
+ if (sharedPreferences.getBoolean("full_screen_browsing_mode", false)) {
+ // Set `fullScreenBrowsingModePreference` to use the enabled icon.
+ fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled);
+
+ if (sharedPreferences.getBoolean("hide_system_bars", false)) {
+ // Set `hideSystemBarsPreference` to use the enabled icon.
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled);
+
+ // Update `translucentNavigationBarPreference`.
+ translucentNavigationBarPreference.setEnabled(false);
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted);
+ } else { // `hide_system_bars` is false.
+ // Set `hideSystemBarsPreference` to use the disabled icon.
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled);
+
+ // Update `translucentNavigationBarPreference`.
+ translucentNavigationBarPreference.setEnabled(true);
+ if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled);
+ } else {
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled);
+ }
+ }
+ } else { // `full_screen_browsing_mode` is false.
+ // Disable `translucentNavigationBarPreference`.
+ translucentNavigationBarPreference.setEnabled(false);
+
+ // Update the icons.
+ fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled);
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_ghosted);
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted);
+ }
+ break;
+
+ case "hide_system_bars":
+ if (sharedPreferences.getBoolean("hide_system_bars", false)) {
+ // Set `hideSystemBarsPreference` to use the enabled icon.
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_enabled);
+
+ // Update `translucentNavigationBarPreference`.
+ translucentNavigationBarPreference.setEnabled(false);
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted);
+ } else { // `hide_system_bars` is false.
+ // Set `hideSystemBarsPreference` to use the disabled icon.
+ hideSystemBarsPreference.setIcon(R.drawable.hide_system_bars_disabled);
+
+ // Update `translucentNavigationBarPreference`.
+ translucentNavigationBarPreference.setEnabled(true);
+ if (sharedPreferences.getBoolean("translucent_navigation_bar", true)) {
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_enabled);
+ } else {
+ translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_disabled);
+ }
+ }
+ break;