2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-05 21:20:45 +00:00

For #3011 - Size EngineView for Custom Tab Fixed Toolbar

This commit is contained in:
Emily Kager 2019-05-30 11:52:16 -07:00 committed by Jeff Boek
parent b8c04e02e9
commit c027feecd0

View File

@ -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
)
}
}