FlexRow

class FlexRow(spacing: Double) : Layout

Layout that stacks children horizontally with optional spacing. It scales Views up to fit the parent's height and take up as much horizontal room as possible. But it respects minimum width, and won't make Views narrower.

Parameters

spacing

between Views

Constructors

Link copied to clipboard
constructor(spacing: Double)

Inherited functions

Link copied to clipboard
open override fun child(of: PositionableContainer, at: Point): LookupResult

Gets the child within the Positionable at the given point. The default is to ignore these calls and let the caller perform their own search for the right child. But Layouts are free to return a value here if it can be done more efficiently.

Link copied to clipboard
open override fun idealSize(container: PositionableContainer, default: Size?): Size?

Returns the ideal size of the Positionable based on its contents.

Link copied to clipboard
open override fun layout(container: PositionableContainer)

Lays out the children of the given Positionable.

Link copied to clipboard
open override fun minimumSize(container: PositionableContainer, default: Size): Size

Returns the minimum size of the Positionable based on its contents.

Link copied to clipboard
open override fun requiresLayout(container: PositionableContainer, old: Size, new: Size): Boolean

Indicates whether a layout is needed because of the given size change to the Container. This is called whenever the container's size changes.

Indicates whether a layout is needed because of the given size preferences change to a child of the given Container. This is called whenever the container's size changes.

open override fun requiresLayout(child: Positionable, of: PositionableContainer, old: Rectangle, new: Rectangle): Boolean

Indicates whether a layout is needed because of the given bounds change to a child of the given Container. This is called whenever the container's size changes.

Link copied to clipboard
infix fun Layout.then(onLayout: (PositionableContainer) -> Unit): Layout

Provides a way to get notified each time a Layout is done positioning.