tabLayout = findViewById(R.id.tablayout);
swipeRefreshLayout = findViewById(R.id.swiperefreshlayout);
webViewPager = findViewById(R.id.webviewpager);
- fullScreenVideoFrameLayout = findViewById(R.id.full_screen_video_framelayout);
-
- // Get a handle for the navigation view.
NavigationView navigationView = findViewById(R.id.navigationview);
+ fullScreenVideoFrameLayout = findViewById(R.id.full_screen_video_framelayout);
// Get a handle for the navigation menu.
Menu navigationMenu = navigationView.getMenu();
defaultProgressViewEndOffset = swipeRefreshLayout.getProgressViewEndOffset();
// Set the refresh color scheme according to the theme.
- if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
- swipeRefreshLayout.setColorSchemeResources(R.color.blue_700);
- } else {
- swipeRefreshLayout.setColorSchemeResources(R.color.violet_500);
- }
+ swipeRefreshLayout.setColorSchemeResources(R.color.blue_text);
// Initialize a color background typed value.
TypedValue colorBackgroundTypedValue = new TypedValue();
inputMethodManager.hideSoftInputFromWindow(currentWebView.getWindowToken(), 0);
}
- // Clear the focus from from the URL text box and the WebView. This removes any text selection markers and context menus, which otherwise draw above the open drawers.
+ // Clear the focus from from the URL text box. This removes any text selection markers and context menus, which otherwise draw above the open drawers.
urlEditText.clearFocus();
- currentWebView.clearFocus();
+
+ // Clear the focus from from the WebView if it is not null, which can happen if a user opens a drawer while the browser is being resumed.
+ if (currentWebView != null) {
+ // Clearing the focus from the WebView removes any text selection markers and context menus, which otherwise draw above the open drawers.
+ currentWebView.clearFocus();
+ }
}
}
});