作者:书友49457861 | 来源:互联网 | 2023-02-12 17:58
使用Anko我可以写这样的东西来显示对话框:
alert("Dialog title") {
yesButton {}
noButton {}
}.show()
我如何为按钮设置标题?
noButton {title = "title"}
不起作用.
1> miensol..:
你可以使用positiveButton
和negativeButton
喜欢这样:
alert("Dialog title") {
positiveButton("Yes") { it.dismiss() }
negativeButton("No") { it.dismiss() }
}.show()