1
0
Fork 0

For #6821: Fixes issues with custom tabs and dynamic toolbar (#6822)

master
Sawyer Blatz 2019-11-26 13:02:52 -08:00 committed by GitHub
parent 33b49ff7fd
commit db02fc6ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 16 deletions

View File

@ -5,7 +5,6 @@
package org.mozilla.fenix.customtabs
import android.app.Activity
import android.view.Gravity
import android.view.View
import androidx.appcompat.content.res.AppCompatResources
import androidx.coordinatorlayout.widget.CoordinatorLayout
@ -43,13 +42,6 @@ class CustomTabsIntegration(
}
}
// Make the toolbar go to the top.
toolbar.run {
(layoutParams as CoordinatorLayout.LayoutParams).apply {
gravity = Gravity.TOP
}
}
val task = LottieCompositionFactory
.fromRawRes(
activity,

View File

@ -7,7 +7,6 @@ package org.mozilla.fenix.customtabs
import android.content.Context
import android.view.Gravity
import android.view.View
import androidx.core.view.isGone
import androidx.navigation.fragment.navArgs
import kotlinx.android.synthetic.main.component_browser_top_toolbar.*
import kotlinx.android.synthetic.main.fragment_browser.view.*
@ -187,13 +186,8 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), BackHandler {
}
override fun getEngineMargins(): Pair<Int, Int> {
val toolbarHidden = toolbar.isGone
return if (toolbarHidden) {
0 to 0
} else {
val toolbarSize = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height)
toolbarSize to 0
}
// Since the top toolbar is dynamic we don't want any margins
return 0 to 0
}
override fun getContextMenuCandidates(