Join us for ⁠#Android11: The Beta Launch Show on June 3!

OwnedLayer

interface OwnedLayer
androidx.ui.core.OwnedLayer

A layer returned by Owner.createLayer to separate drawn content. An OwnedLayer has the implementation to make DrawLayerModifiers work.

Summary

Public methods

abstract Unit

Indicates that the layer is no longer needed.

abstract Unit
drawLayer(canvas: Canvas)

Causes the layer to be drawn into canvas

abstract Matrix

Returns a matrix that this layer will use to transform the contents.

abstract Unit

Asks to the layer to redraw itself without forcing all of its parents to redraw.

abstract Unit
move(position: IntPxPosition)

Changes the position of the layer contents.

abstract Unit

Changes the size of the layer's drawn area.

abstract Unit

Updates the drawing on the current canvas.

abstract Unit

Reads the DrawLayerModifier and dirties the layer so that it will be redrawn.

Properties

abstract Long

The ID of the layer.

Public methods

destroy

abstract fun destroy(): Unit

Indicates that the layer is no longer needed.

drawLayer

abstract fun drawLayer(canvas: Canvas): Unit

Causes the layer to be drawn into canvas

getMatrix

abstract fun getMatrix(): Matrix

Returns a matrix that this layer will use to transform the contents. The caller must not modify the returned Matrix.

invalidate

abstract fun invalidate(): Unit

Asks to the layer to redraw itself without forcing all of its parents to redraw.

move

abstract fun move(position: IntPxPosition): Unit

Changes the position of the layer contents.

resize

abstract fun resize(size: IntPxSize): Unit

Changes the size of the layer's drawn area.

updateDisplayList

abstract fun updateDisplayList(): Unit

Updates the drawing on the current canvas.

updateLayerProperties

abstract fun updateLayerProperties(): Unit

Reads the DrawLayerModifier and dirties the layer so that it will be redrawn.

Properties

layerId

abstract val layerId: Long

The ID of the layer. This is used by tooling to match a layer to the associated LayoutNode.