parent
33b49ff7fd
commit
db02fc6ef8
|
@ -5,7 +5,6 @@
|
||||||
package org.mozilla.fenix.customtabs
|
package org.mozilla.fenix.customtabs
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.view.Gravity
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
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
|
val task = LottieCompositionFactory
|
||||||
.fromRawRes(
|
.fromRawRes(
|
||||||
activity,
|
activity,
|
||||||
|
|
|
@ -7,7 +7,6 @@ package org.mozilla.fenix.customtabs
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.view.isGone
|
|
||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import kotlinx.android.synthetic.main.component_browser_top_toolbar.*
|
import kotlinx.android.synthetic.main.component_browser_top_toolbar.*
|
||||||
import kotlinx.android.synthetic.main.fragment_browser.view.*
|
import kotlinx.android.synthetic.main.fragment_browser.view.*
|
||||||
|
@ -187,13 +186,8 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), BackHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getEngineMargins(): Pair<Int, Int> {
|
override fun getEngineMargins(): Pair<Int, Int> {
|
||||||
val toolbarHidden = toolbar.isGone
|
// Since the top toolbar is dynamic we don't want any margins
|
||||||
return if (toolbarHidden) {
|
return 0 to 0
|
||||||
0 to 0
|
|
||||||
} else {
|
|
||||||
val toolbarSize = resources.getDimensionPixelSize(R.dimen.browser_toolbar_height)
|
|
||||||
toolbarSize to 0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getContextMenuCandidates(
|
override fun getContextMenuCandidates(
|
||||||
|
|
Loading…
Reference in New Issue