Created
April 20, 2020 02:06
-
-
Save furkanaskin/c48c4740953d5a3b4a5dfcac8d9a99b8 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
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>(com.google.android.material.R.id.design_bottom_sheet) 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