Created
April 20, 2020 02:03
-
-
Save furkanaskin/40883efd4fdc29a3176bf83f57059dbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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