]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
Fix the app bar and the find on page bar both being displayed on resume. Fixes https...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / MainWebViewActivity.java
index 60ff281448bded819d6ae54f51c92b23b3843b02..1a77420d89b673938509a1a75335c53a492498cd 100644 (file)
@@ -987,6 +987,11 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
 
         // Prepare the font size title and current size menu item.
         switch (fontSize) {
+            case 25:
+                fontSizeTitle = getResources().getString(R.string.font_size) + " - " + getResources().getString(R.string.twenty_five_percent);
+                selectedFontSizeMenuItem = menu.findItem(R.id.fontSizeTwentyFivePercent);
+                break;
+
             case 50:
                 fontSizeTitle = getResources().getString(R.string.font_size) + " - " + getResources().getString(R.string.fifty_percent);
                 selectedFontSizeMenuItem = menu.findItem(R.id.fontSizeFiftyPercent);
@@ -1191,6 +1196,10 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
                 Snackbar.make(findViewById(R.id.main_webview), R.string.form_data_deleted, Snackbar.LENGTH_SHORT).show();
                 return true;
 
+            case R.id.fontSizeTwentyFivePercent:
+                mainWebView.getSettings().setTextZoom(25);
+                return true;
+
             case R.id.fontSizeFiftyPercent:
                 mainWebView.getSettings().setTextZoom(50);
                 return true;
@@ -2248,8 +2257,10 @@ public class MainWebViewActivity extends AppCompatActivity implements Navigation
             // Reset `inFullScreenBrowsingMode` to `false`.
             inFullScreenBrowsingMode = false;
 
-            // Show the `appBar`.
-            appBar.show();
+            // Show the `appBar` if `findOnPageLinearLayout` is not visible.
+            if (findOnPageLinearLayout.getVisibility() == View.GONE) {
+                appBar.show();
+            }
 
             // Show the `BannerAd` in the free flavor.
             if (BuildConfig.FLAVOR.contentEquals("free")) {