m1shk4
(yourView.layoutParams as CoordinatorLayout.LayoutParams).behavior = BottomSheetBehavior<YourViewClass>()