Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
open class BaseBottomSheetFragment : BottomSheetDialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val dialog = super.onCreateDialog(savedInstanceState)
if (dialog.window != null) {
dialog.window!!.setGravity(Gravity.BOTTOM)
dialog.window!!.setBackgroundDrawableResource(android.R.color.transparent)
dialog.window!!.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
dialog.setCancelable(false)
}
return dialog
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment