【发布时间】:2016-07-23 11:02:52
【问题描述】:
如何在 Anko 的 gridLayout 中设置元素的列值和行值?
我尝试了几个版本,但都无法编译:
return UI {
gridLayout() {
columnCount = 2
rowCount = 3
button("1x1") {
}.lparams() { column = 1; row = 1 }
}
}.view
当我像这样(作为函数)或大括号内的属性时,它表示它不能引用column 或row。当我将它们作为参数提供给 lparams 时,它会显示 none of the following functions can be called with arguments supplied。
【问题讨论】: