Search code examples
nativescriptgrid-layout

Does anyone else find the NativeScript GridLayout's 'row/column' and 'rows/cols' pair confusing?


In my humble opinion, it should either be

<GridLayout rows="auto auto" cols="auto auto"></GridLayout>

and then: <Lable row="0" col="0"></Label> etc.

or

<GridLayout rows="auto auto" columns="auto auto"></GridLayout>

and then: <Lable row="0" column="0"></Label> etc.

It almost always gets me when I am not copying pasting, as to which one is using col and which one is using column..

Did anyone else ever feel this inconsistency?


Solution

  • Yes Earlier it was confusing to me as well. Now I remember this by following the below technique

    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.

    :)