home: make sure to avoid touch overlay crash
Only configure the touch overlay when the fragment resumes, and don't do any weird post stuff.
This commit is contained in:
parent
a036005f75
commit
5efdfb6aac
1 changed files with 7 additions and 9 deletions
|
@ -222,13 +222,12 @@ class HomeFragment :
|
||||||
collect(detailModel.toShow.flow, ::handleShow)
|
collect(detailModel.toShow.flow, ::handleShow)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStart() {
|
override fun onResume() {
|
||||||
super.onStart()
|
super.onResume()
|
||||||
|
|
||||||
// Stock bottom sheet overlay won't work with our nested UI setup, have to replicate
|
// Stock bottom sheet overlay won't work with our nested UI setup, have to replicate
|
||||||
// it ourselves.
|
// it ourselves.
|
||||||
requireBinding().root.rootView.apply {
|
requireBinding().root.rootView.apply {
|
||||||
post {
|
|
||||||
findViewById<View>(R.id.main_scrim).setOnTouchListener { _, event ->
|
findViewById<View>(R.id.main_scrim).setOnTouchListener { _, event ->
|
||||||
handleSpeedDialBoundaryTouch(event)
|
handleSpeedDialBoundaryTouch(event)
|
||||||
}
|
}
|
||||||
|
@ -237,7 +236,6 @@ class HomeFragment :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
val transition = enterTransition
|
val transition = enterTransition
|
||||||
|
|
Loading…
Reference in a new issue