anko icon indicating copy to clipboard operation
anko copied to clipboard

Implement Bottom Sheets (Proposal)

Open thatfiredev opened this issue 6 years ago • 2 comments

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?

thatfiredev avatar Jul 09 '18 21:07 thatfiredev

nice idea, its make save time for everyone to create bottomsheet without create xml layout etc. nice!

rakaadinugroho avatar Aug 14 '18 08:08 rakaadinugroho

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()

pcholt avatar Feb 16 '19 06:02 pcholt