From 5dcf4e5a5fe3980ac7749b3ab642ef6de5816e19 Mon Sep 17 00:00:00 2001 From: Colin Lee Date: Sun, 10 Feb 2019 18:51:30 -0600 Subject: [PATCH] Fixes #427: Browser toolbar does not auto-hide if ANY accessibility on --- .../mozilla/fenix/browser/BrowserFragment.kt | 2 +- app/src/main/res/layout/fragment_browser.xml | 51 +++++++++---------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt index b0b089ebc..3b2ce8b80 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt @@ -80,7 +80,7 @@ class BrowserFragment : Fragment(), BackHandler { val accessibilityManager = context ?.getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager - if (!accessibilityManager.isEnabled) { + if (!accessibilityManager.isTouchExplorationEnabled) { behavior = BrowserToolbarBottomBehavior(view.context, null) } diff --git a/app/src/main/res/layout/fragment_browser.xml b/app/src/main/res/layout/fragment_browser.xml index ece8b4fdf..745acd34a 100644 --- a/app/src/main/res/layout/fragment_browser.xml +++ b/app/src/main/res/layout/fragment_browser.xml @@ -11,37 +11,32 @@ android:layout_height="match_parent" tools:context="browser.BrowserFragment"> - + android:layout_height="match_parent" /> - - - - + + android:id="@+id/findInPageView" + android:layout_width="match_parent" + android:layout_height="56dp" + android:layout_gravity="bottom" + android:background="@color/off_white" + mozac:findInPageResultCountTextColor="?android:attr/colorPrimary" + mozac:findInPageButtonsTint="?android:attr/colorPrimary" + android:visibility="gone" + app:layout_behavior="org.mozilla.fenix.components.FindInPageBarBehavior" /> \ No newline at end of file