Skip to content

Instantly share code, notes, and snippets.

@BonusTrack02
Created August 27, 2023 16:19
Show Gist options
  • Save BonusTrack02/9727aa9a7d7a0b993fc290c9336f6627 to your computer and use it in GitHub Desktop.
Save BonusTrack02/9727aa9a7d7a0b993fc290c9336f6627 to your computer and use it in GitHub Desktop.
onStart BottomSheet height
override fun onStart() {
super.onStart()
if (dialog != null) {
val bottomSheet =
dialog!!.findViewById<View>(com.google.android.material.R.id.design_bottom_sheet)
bottomSheet.layoutParams.height = 600
val behavior = BottomSheetBehavior.from(bottomSheet)
behavior.state = BottomSheetBehavior.STATE_EXPANDED
behavior.skipCollapsed = true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment