With Anko, I can write something like this for showing dialog:
alert("Dialog title") {
yesButton {}
noButton {}
}.show()
How can I set a title for the button?
noButton {title = "title"}
Unfortunately, it doesn't work.
You can use positiveButton
and negativeButton
like so:
alert("Dialog title") {
positiveButton("Yes") { it.dismiss() }
negativeButton("No") { it.dismiss() }
}.show()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With