- // Set the summary text for `tor_javascript_enabled_search`.
- if (presentTorJavaScriptEnabledSearchString.equals("Custom URL")) {
- // Use R.string.custom_url, which is translated, instead of the array value, which isn't.
- torJavaScriptEnabledSearchPreference.setSummary(R.string.custom_url);
- } else {
- // Set the array value as the summary text.
- torJavaScriptEnabledSearchPreference.setSummary(presentTorJavaScriptEnabledSearchString);
+ 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);