[fenix] For https://github.com/mozilla-mobile/fenix/issues/3011 - Size EngineView for Custom Tab Fixed Toolbar

pull/600/head
Emily Kager 5 years ago committed by Jeff Boek
parent 9a301da8bb
commit 1c75ee039e

@ -164,17 +164,17 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
}
}
if (customTabSessionId == null) {
view.engineView.asView().apply {
(layoutParams as CoordinatorLayout.LayoutParams).apply {
setMargins(
0,
0,
0,
(resources.displayMetrics.density * TOOLBAR_HEIGHT).toInt() +
QUICK_ACTION_SHEET_HANDLE_HEIGHT
)
}
view.engineView.asView().apply {
val toolbarSize =
(resources.displayMetrics.density * TOOLBAR_HEIGHT).toInt() +
(if (customTabSessionId == null) QUICK_ACTION_SHEET_HANDLE_HEIGHT else 0)
(layoutParams as CoordinatorLayout.LayoutParams).apply {
setMargins(
0,
if (customTabSessionId == null) 0 else toolbarSize,
0,
if (customTabSessionId == null) toolbarSize else 0
)
}
}

Loading…
Cancel
Save