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 GridFlag instance with isPlaceLayoutsOnSpansFirst as true.

Public functions

infix GridFlag
or(other: GridFlag)

or operator override to allow combining flags

open String

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

None

Added in 1.1.0
val NoneGridFlag

All default behaviors apply.

PlaceLayoutsOnSpansFirst

Added in 1.1.0
val PlaceLayoutsOnSpansFirstGridFlag

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

or

infix fun or(other: GridFlag): GridFlag

or operator override to allow combining flags

toString

open fun toString(): String

Public properties

isPlaceLayoutsOnSpansFirst

Added in 1.1.0
val isPlaceLayoutsOnSpansFirstBoolean

When true, the Grid helper will first place Layouts on cells occupied by spans, then fill the remaining cells following the typical arrangement rules.