3
如何爲Anko中的gridLayout中的元素設置列和行值?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
。