anko
anko copied to clipboard
Implement Bottom Sheets (Proposal)
After seeing #632 , I propose implementing Bottom Sheet Dialogs in anko. They'd work similarly to Alert Dialogs:
bottomSheet {
option(R.drawable.share_icon, "Share") {
//On Click action
}
option(R.drawable.link_icon, "Get link") {
//On Click action
}
option(R.drawable.edit_icon, "Edit Link") {
//On Click action
}
option(R.drawable.delete_icon, "Delete Collection") {
//On Click action
}
}.show()
What do you think?
nice idea, its make save time for everyone to create bottomsheet without create xml layout etc. nice!
So... you would use bottomSheet
instead of alert
to create the bottom sheet dialog? Probably with the ability to create a customView instead of a list, and intercept the cancel and dismiss actions:
bottomSheet {
customView {
editText()
}
onCancel {
}
onDismiss {
}
}.show()