I am a strange situation. I have made a standard bottom sheet in my app. Everything works fine until I start dragging to close the bottom sheet in a speedy way. The bottom sheet seems go out off screen (you can check the attached gif below). I have checked its slide-offset and the slide-offset reached negative float in this case. Any ideas to keep the bottom sheet not go out of screen?
Update: This is my layout structure and bottom sheet config for double checking if necessary.
<androidx.constraintlayout.widget.ConstraintLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout>
<androidx.fragment.app.FragmentContainerView />
<androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/standard_bottom_sheet" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
// Bottom sheet content
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
</androidx.constraintlayout.widget.ConstraintLayout>
Material lib version 1.9.0
App theme is extended from Theme.Material3.Dark.NoActionBar
Init bottom sheet like this: BottomSheetBehavior.from(binding.standardBottomSheet)