[fenix] For https://github.com/mozilla-mobile/fenix/issues/18122 - Update browser layout for find in page bar with bottom toolbar

With a dynamic bottom toolbar the  browser extends all the way to the bottom of
the screen and so when the find in page bar is shown it will be so above the
bottom part of the browser which may contain exactly the searched for items.

To fix the browser must effectively be placed at the top of the newly shown
find in page bar.
pull/600/head
Mugurell 4 years ago committed by Mihai Adrian Carare
parent a7deb00521
commit 87b9259885

@ -67,6 +67,10 @@ class FindInPageIntegration(
} else { } else {
engineViewParent.translationY = 0f engineViewParent.translationY = 0f
} }
} else {
if (toolbarInfo.isToolbarDynamic) {
engineViewParentParams.bottomMargin = 0
}
} }
} }
@ -86,6 +90,10 @@ class FindInPageIntegration(
// With a fixed toolbar the EngineView is anchored below the toolbar with 0 Y translation. // With a fixed toolbar the EngineView is anchored below the toolbar with 0 Y translation.
engineViewParent.translationY = -toolbarInfo.toolbar.height.toFloat() engineViewParent.translationY = -toolbarInfo.toolbar.height.toFloat()
} }
} else {
// With a bottom toolbar the EngineView is already anchored to the top of the screen.
// Need just to ensure space for the find in page bar under the engineView.
engineViewParentParams.bottomMargin = toolbarInfo.toolbar.height
} }
} }

Loading…
Cancel
Save