gln*_*nix 7 android kotlin anko
使用Anko我可以写这样的东西来显示对话框:
alert("Dialog title") {
yesButton {}
noButton {}
}.show()
Run Code Online (Sandbox Code Playgroud)
我如何为按钮设置标题?
noButton {title = "title"}
Run Code Online (Sandbox Code Playgroud)
不起作用.
mie*_*sol 15
你可以使用positiveButton和negativeButton喜欢这样:
alert("Dialog title") {
positiveButton("Yes") { it.dismiss() }
negativeButton("No") { it.dismiss() }
}.show()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1033 次 |
| 最近记录: |