For #2561 - Dynamically set EngineView behavior in BrowserFragment
parent
2f68546a58
commit
43843b0fb3
|
@ -41,6 +41,7 @@ import mozilla.components.feature.downloads.DownloadsFeature
|
|||
import mozilla.components.feature.intent.IntentProcessor
|
||||
import mozilla.components.feature.prompts.PromptFeature
|
||||
import mozilla.components.feature.readerview.ReaderViewFeature
|
||||
import mozilla.components.feature.session.behavior.EngineViewBottomBehavior
|
||||
import mozilla.components.feature.session.FullScreenFeature
|
||||
import mozilla.components.feature.session.SessionFeature
|
||||
import mozilla.components.feature.session.SessionUseCases
|
||||
|
@ -213,6 +214,12 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
|||
view = view
|
||||
)
|
||||
|
||||
if (customTabSessionId == null) {
|
||||
(engineView.asView().layoutParams as CoordinatorLayout.LayoutParams).apply {
|
||||
behavior = EngineViewBottomBehavior(context, null)
|
||||
}
|
||||
}
|
||||
|
||||
downloadsFeature.set(
|
||||
feature = DownloadsFeature(
|
||||
requireContext(),
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
<mozilla.components.concept.engine.EngineView
|
||||
android:id="@+id/engineView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="mozilla.components.feature.session.behavior.EngineViewBottomBehavior"/>
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/nestedScrollQuickAction"
|
||||
|
|
Loading…
Reference in New Issue