1
0
Fork 0

For #2561 - Dynamically set EngineView behavior in BrowserFragment

master
Emily Kager 2019-05-16 10:01:03 -07:00 committed by Emily Kager
parent 2f68546a58
commit 43843b0fb3
2 changed files with 8 additions and 2 deletions

View File

@ -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(),

View File

@ -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"