File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11# ModalBottomSheetDialogFragment
22Modal bottom sheet dialog based on the [ Material Guidelines] ( https://material.io/components/sheets-bottom )
3+
34[ ![ ] ( https://jitpack.io/v/Commit451/ModalBottomSheetDialogFragment.svg )] ( https://jitpack.io/#Commit451/ModalBottomSheetDialogFragment )
45
56<img src =" /art/simple.png?raw=true " width =" 200px " > <img src =" /art/header.png?raw=true " width =" 200px " > <img src =" /art/custom.png?raw=true " width =" 200px " >
@@ -53,9 +54,17 @@ ModalBottomSheetDialogFragment.Builder()
5354 .add(R .menu.options)
5455 .show(supportFragmentManager, " options" )
5556```
56- Make sure that your activity or fragment implements ` ModalBottomSheetDialogFragment.Listener ` . For example:
57+ Make sure that your ` Activity ` or ` Fragment ` implements ` ModalBottomSheetDialogFragment.Listener ` . For example:
5758``` kotlin
5859override fun onModalOptionSelected (tag : String? , option : Option ) {
60+ when (option.id) {
61+ R .id.action_edit -> {
62+ // edit something
63+ }
64+ R .id.action_delete -> {
65+ // delete something
66+ }
67+ }
5968 Snackbar .make(root, " Selected option ${option.title} from fragment with tag $tag " , Snackbar .LENGTH_SHORT )
6069 .show()
6170}
You can’t perform that action at this time.
0 commit comments