Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class BottomSheetSampleFragment : BaseBottomSheetFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val dialog = super.onCreateDialog(savedInstanceState) as BottomSheetDialog
dialog.setOnShowListener {
val bottomSheet =
(it as BottomSheetDialog).findViewById<View>( as FrameLayout?
val behavior = BottomSheetBehavior.from(bottomSheet!!)
behavior.state = BottomSheetBehavior.STATE_EXPANDED
behavior.isDraggable = false
return dialog
// Other stuffs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment