有了 Anko,我可以写这样的东西来显示对话框:
alert("Dialog title") {
yesButton {}
noButton {}
}.show()
如何为按钮设置标题?
noButton {title = "title"}
不幸的是,它不起作用。
最佳答案
您可以使用 positiveButton
和 negativeButton
像这样:
alert("Dialog title") {
positiveButton("Yes") { it.dismiss() }
negativeButton("No") { it.dismiss() }
}.show()
关于android - Anko 对话框按钮标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42082380/