还有其他人觉得 NativeScript GridLayout 的 'row/column' 和 'rows/cols' 对令人困惑吗?
Does anyone else find the NativeScript GridLayout's 'row/column' and 'rows/cols' pair confusing?
依我拙见,应该是
<GridLayout rows="auto auto" cols="auto auto"></GridLayout>
然后:
<Lable row="0" col="0"></Label>
等
或
<GridLayout rows="auto auto" columns="auto auto"></GridLayout>
然后:
<Lable row="0" column="0"></Label>
等
当我不复制粘贴时,它几乎总是让我感到困惑,至于哪个使用 col,哪个使用 column..
有没有人感觉到这种不一致?
是的,早些时候我也很困惑。现在我通过以下技巧记住了这一点
Every cell needs a row(singular - 3 letter word) and to match that we need
a col(singular - 3 letter word), then for the top level you can use
columns.
:)
依我拙见,应该是
<GridLayout rows="auto auto" cols="auto auto"></GridLayout>
然后:
<Lable row="0" col="0"></Label>
等
或
<GridLayout rows="auto auto" columns="auto auto"></GridLayout>
然后:
<Lable row="0" column="0"></Label>
等
当我不复制粘贴时,它几乎总是让我感到困惑,至于哪个使用 col,哪个使用 column..
有没有人感觉到这种不一致?
是的,早些时候我也很困惑。现在我通过以下技巧记住了这一点
Every cell needs a row(singular - 3 letter word) and to match that we need a col(singular - 3 letter word), then for the top level you can use columns.
:)