Placeable

abstract class Placeable
kotlin.Any
   ↳ androidx.ui.core.Placeable

A Placeable corresponds to a child layout that can be positioned by its parent layout. Most Placeables are the result of a Measurable.measure call.

A Placeable should never be stored between measure calls.

Summary

Public constructors

A Placeable corresponds to a child layout that can be positioned by its parent layout.

Public methods

abstract operator IntPx?

Returns the position of an alignment line, or null if the line is not provided.

Protected methods

abstract Unit

Positions the Placeable at position in its parent's coordinate system.

Companion functions

Unit

Place a Placeable at position in its parent's coordinate system.

Unit

Place a Placeable at position in its parent's coordinate system.

Unit

Place a Placeable at x, y in its parent's coordinate system.

Unit
Placeable.place(x: Px, y: Px)

Place a Placeable at x, y in its parent's coordinate system.

Properties

IntPx

The height, in pixels, of the measured layout.

abstract IntPxSize

The measured size of this Placeable.

IntPx

The width, in pixels, of the measured layout.

Public constructors

<init>

Placeable()

A Placeable corresponds to a child layout that can be positioned by its parent layout. Most Placeables are the result of a Measurable.measure call.

A Placeable should never be stored between measure calls.

Public methods

get

abstract operator fun get(line: AlignmentLine): IntPx?

Returns the position of an alignment line, or null if the line is not provided.

Protected methods

performPlace

protected abstract fun performPlace(position: IntPxPosition): Unit

Positions the Placeable at position in its parent's coordinate system.

Properties

height

val height: IntPx

The height, in pixels, of the measured layout. This is the height value passed into MeasureScope.layout.

size

abstract val size: IntPxSize

The measured size of this Placeable.

width

val width: IntPx

The width, in pixels, of the measured layout. This is the width value passed into MeasureScope.layout.

Companion functions

place

fun Placeable.place(position: IntPxPosition): Unit

Place a Placeable at position in its parent's coordinate system.

place

fun Placeable.place(position: PxPosition): Unit

Place a Placeable at position in its parent's coordinate system.

place

fun Placeable.place(
    x: IntPx,
    y: IntPx
): Unit

Place a Placeable at x, y in its parent's coordinate system.

place

fun Placeable.place(
    x: Px,
    y: Px
): Unit

Place a Placeable at x, y in its parent's coordinate system.