GridFlag
value class GridFlag
Set of individual options that may change the Grid helper behavior, each flag can be combined with the GridFlag.or operator.
By default, the Grid helper places its LayoutReferences as given in the elements parameter. Following arrangement rules (skips, spans and orientation).
However, when isPlaceLayoutsOnSpansFirst is true. The given LayoutReferences will be first placed on the cells occupied by the given spans array. Then, the remaining layouts are placed on the remaining cells following typical arrangement rules.
For example, on a grid layout with 1 row and 3 columns, placing two widgets: w0, w1, with a span defined as Span(position = 1, rows = 1, columns = 2). The grid layout by default would place them as [w0 w1 w1]. Whereas when isPlaceLayoutsOnSpansFirst is true, they'd be placed as [w1 w0 w0].
In some situations, isPlaceLayoutsOnSpansFirst can make it easier to match the desired layouts with the given spans on the Grid.
| See also | |
|---|---|
createGrid |
Summary
Public companion properties |
|
|---|---|
GridFlag |
All default behaviors apply. |
GridFlag |
Creates a |
Public functions |
|
|---|---|
infix GridFlag |
|
open String |
toString() |
Public properties |
|
|---|---|
Boolean |
When true, the Grid helper will first place Layouts on cells occupied by spans, then fill the remaining cells following the typical arrangement rules. |
Public companion properties
PlaceLayoutsOnSpansFirst
val PlaceLayoutsOnSpansFirst: GridFlag
Creates a GridFlag instance with isPlaceLayoutsOnSpansFirst as true.
Making it so that when placing the layouts, they are first placed on cells occupied by spans, then, any remaining layouts are placed on the remaining cells following the typical arrangement rules.
Public functions
Public properties
isPlaceLayoutsOnSpansFirst
val isPlaceLayoutsOnSpansFirst: Boolean
When true, the Grid helper will first place Layouts on cells occupied by spans, then fill the remaining cells following the typical arrangement rules.