Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #18122 - Update browser layout for find in page bar with bottom t…
Browse files Browse the repository at this point in the history
…oolbar

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.
  • Loading branch information
Mugurell authored and mcarare committed Apr 9, 2021
1 parent b36431a commit 660f060
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class FindInPageIntegration(
} else {
engineViewParent.translationY = 0f
}
} else {
if (toolbarInfo.isToolbarDynamic) {
engineViewParentParams.bottomMargin = 0
}
}
}

Expand All @@ -86,6 +90,10 @@ class FindInPageIntegration(
// With a fixed toolbar the EngineView is anchored below the toolbar with 0 Y translation.
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
}
}

Expand Down

0 comments on commit 660f060

Please sign in to comment.