+ });
+
+ // Get the current theme status.
+ int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
+
+ // Check to see if the app is in night mode.
+ if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES && WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) { // The app is in night mode.
+ // Apply the dark WebView theme.
+ WebSettingsCompat.setForceDark(tabWebView.getSettings(), WebSettingsCompat.FORCE_DARK_ON);
+ }
+
+ // Load the indicated tab. The tab numbers start at 0, with the WebView tabs starting at 1.
+ switch (tabNumber) {
+ case 1:
+ // Load the Permissions tab.
+ tabWebView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.android_asset_path) + "/about_permissions.html");
+ break;
+
+ case 2:
+ // Load the Privacy Policy tab.
+ tabWebView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.android_asset_path) + "/about_privacy_policy.html");
+ break;
+
+ case 3:
+ // Load the Changelog tab.
+ tabWebView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.android_asset_path) + "/about_changelog.html");
+ break;
+
+ case 4:
+ // Load the Licenses tab.
+ tabWebView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.android_asset_path) + "/about_licenses.html");
+ break;
+
+ case 5:
+ // Load the Contributors tab.
+ tabWebView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.android_asset_path) + "/about_contributors.html");
+ break;
+
+ case 6:
+ // Load the Links tab.
+ tabWebView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.android_asset_path) + "/about_links.html");
+ break;