我正在尝试使用 anko 在警报中添加一个微调器。到目前为止,我的代码如下所示:
alert(getString(R.string.alert)) {
positiveButton("Cool") { toast("Yess!!!") }
customView {
linearLayout {
textView("I'm a text")
padding = dip(16)
orientation = LinearLayout.VERTICAL
spinner(R.style.Widget_AppCompat_Spinner) {
id = R.id.spinner_todo_category
prompt = "Select a Category"
}
}
}
}.show()
但我得到编译错误,因为显然这不是如何调用微调器。我一直在看文档(Anko GitHub Wiki),但它没有提到微调器。
提前致谢