// `inputMethodManager` is used in `onOptionsItemSelected()`, `loadUrlFromTextBox()`, and `closeFindOnPage()`.
private InputMethodManager inputMethodManager;
+ // `mainWebViewRelativeLayout` is used in `onCreate()` and `onNavigationItemSelected()`.
+ private RelativeLayout mainWebViewRelativeLayout;
+
@Override
// Remove Android Studio's warning about the dangers of using SetJavaScriptEnabled. The whole premise of Privacy Browser is built around an understanding of these dangers.
@SuppressLint("SetJavaScriptEnabled")
// Get handles for views that need to be accessed.
drawerLayout = (DrawerLayout) findViewById(R.id.drawerlayout);
rootCoordinatorLayout = (CoordinatorLayout) findViewById(R.id.root_coordinatorlayout);
+ mainWebViewRelativeLayout = (RelativeLayout) findViewById(R.id.main_webview_relativelayout);
mainWebView = (WebView) findViewById(R.id.mainWebView);
findOnPageLinearLayout = (LinearLayout) findViewById(R.id.find_on_page_linearlayout);
findOnPageEditText = (EditText) findViewById(R.id.find_on_page_edittext);
// Remove the translucent status bar overlay on the `Drawer Layout`, which is special and needs its own command.
drawerLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
- /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
- * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
- * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically rehides them after they are shown.
- */
+ /* SYSTEM_UI_FLAG_FULLSCREEN hides the status bar at the top of the screen.
+ * SYSTEM_UI_FLAG_HIDE_NAVIGATION hides the navigation bar on the bottom or right of the screen.
+ * SYSTEM_UI_FLAG_IMMERSIVE_STICKY makes the status and navigation bars translucent and automatically rehides them after they are shown.
+ */
rootCoordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
// Set `rootCoordinatorLayout` to fill the whole screen.
customHeaders.clear();
// Detach all views from `mainWebViewRelativeLayout`.
- RelativeLayout mainWebViewRelativeLayout = (RelativeLayout) findViewById(R.id.mainWebViewRelativeLayout);
mainWebViewRelativeLayout.removeAllViews();
// Destroy the internal state of `mainWebView`.
<!-- android:layout_weight="1" sets the RelativeLayout to fill the rest of the screen because it is encapsulated in a LinearLayout with android:orientation="vertical". -->
<RelativeLayout
- android:id="@+id/mainWebViewRelativeLayout"
+ android:id="@+id/main_webview_relativelayout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
<string name="enable_full_screen_browsing_mode">Habilitar pantalla completa</string>
<string name="enable_full_screen_browsing_mode_summary">Doble toque para pantalla completa.</string>
<string name="hide_system_bars">Esconder las barras del systema</string>
- <string name="hide_system_bars_summary">Esconder las barras de estado y de navegación en el modo de pantalla completa.</string>
+ <string name="hide_system_bars_summary">Esconder las barras de estado y de navegación en el modo de pantalla completa. Esto causa problems si el teclado se muestra en el modo de pantalla completa.</string>
<string name="translucent_navigation_bar">Barra de navegación translúcida</string>
<string name="translucent_navigation_bar_summary">Hacer la barra de navegación translúcida en el modo de pantalla completa.</string>
<string name="general">General</string>
<string name="enable_full_screen_browsing_mode">Enable full screen browsing mode</string>
<string name="enable_full_screen_browsing_mode_summary">Double-tap to toggle full screen browsing mode.</string>
<string name="hide_system_bars">Hide system bars</string>
- <string name="hide_system_bars_summary">Hide the status and navigation bars in full screen mode.</string>
+ <string name="hide_system_bars_summary">Hide the status and navigation bars in full screen browsing mode. This doesn\'t work well if the keyboard is displayed during full screen browsing mode.</string>
<string name="translucent_navigation_bar">Translucent navigation bar</string>
- <string name="translucent_navigation_bar_summary">Make the navigation bar translucent in full screen mode.</string>
+ <string name="translucent_navigation_bar_summary">Make the navigation bar translucent in full screen browsing mode.</string>
<string name="general">General</string>
<string name="homepage_preference">Homepage</string>
<string name="default_font_size">Default font size</string>