How do you set the state of a fragment extending BottomSheetDialogFragment to expanded using BottomSheetBehavior#setState(STATE_EXPANDED) using the
BottomSheetDialogFragment:
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
(dialog as? BottomSheetDialog)?.behavior?.state = STATE_EXPANDED
}
or when ready to show:
private fun onContentLoaded(items: List) {
adapter.submitList(items)
(dialog as? BottomSheetDialog)?.behavior?.state = STATE_EXPANDED
}