The documentation says that this property is not used in GridLayout, but firstly it is there, and secondly, changing it has an effect on nested elements:
Why it happens?
The documentation says that this property is not used in GridLayout, but firstly it is there, and secondly, changing it has an effect on nested elements:
Why it happens?
The documentation clearly states :
The orientation property is not used during layout. It is only used by the layout of the paramters. GridLayout works like LinearLayout in this case; This is a list of choices. If you have a row, it can be added. The rowCount attribute may be used similarly in the vertical case. The default is horizontal.
Here it is indicated that this parameter is not used in the widget, but has a slightly different property. That is, the property does not affect the layout of the layout, but the elements embedded in it, which is observed in your screenshots - the parameter affects the widgets in each cell (if there are several), and not the order of the cells.
The principle is that each GridLayout cell behaves like a LinearLayout (unless otherwise indicated), and it is for this nested layout that the property is specified (more precisely for all cells at once).
On your screenshots, everything happens exactly as written in the documentation.
PS: It is worth reading the documentation in full, and not the first line.
Source: https://ru.stackoverflow.com/questions/549724/
All Articles