PlacementScope

Receiver for the placement pass.

A child that is never placed occupies no space and will not be mounted. Declining to place is therefore how a container drops a child: measuring one to see whether it fits and then leaving it out costs its subtree nothing.

Properties

Link copied to clipboard

The direction the container is laid out in.

Functions

Link copied to clipboard
fun Placeable.place(x: Int = 0, y: Int = 0)

Position this child at x, y relative to this container's top-left.

Link copied to clipboard
fun Placeable.placeRelative(start: Int = 0, top: Int = 0)

Position this child at start from this container's start edge and top from its top, so a right-to-left container mirrors it: the left edge in left-to-right, the right edge in right-to-left, against the width this container declared.

Link copied to clipboard
fun Dimen.toPixels(): Int

This dimension in pixels, as the container's resources resolve it.