Home > Back-end >  BottomSheetDialogFragment behaviour disorder when added nested fragment in Android
BottomSheetDialogFragment behaviour disorder when added nested fragment in Android

Time:02-26

I've a BottomSheetDialogFragment inside a RecyclerView, when is clicked a button BottomSheet is showing. BottomSheetDialog expanding when scrolling down and collapsing when scroll finished on top normally.

enter image description here

But when I place the RecyclerView inside a fragment and lay the fragment to BottomSheetDialog; BottomSheet behaviours not working on the fragment, only works RecyclerView scrolling. On the other hand the behaviours work other places on BottomSheet. How to enable the behaviours as in the first?

CodePudding user response:

You should check that your container layout has app:layout_behavior="@string/bottom_sheet_behavior"> and check that any listener/event you define extra, otherwise BottomSheetDialog normally behaive as you expect.

  • Related