LayoutPadding

data class LayoutPadding : LayoutModifier
kotlin.Any
   ↳ androidx.ui.layout.LayoutPadding

A LayoutModifier that adds left, top, right and bottom padding to the wrapped layout.

Summary

Public constructors

<init>(left: Dp = 0.dp, top: Dp = 0.dp, right: Dp = 0.dp, bottom: Dp = 0.dp)

A LayoutModifier that adds left, top, right and bottom padding to the wrapped layout.

Public methods

Constraints

Modifies constraints for performing measurement of the modified layout element.

IntPxPosition
DensityScope.modifyPosition(childSize: IntPxSize, containerSize: IntPxSize)

Returns the position of a modified child of size childSize within a container of size containerSize.

IntPxSize
DensityScope.modifySize(constraints: Constraints, childSize: IntPxSize)

Returns the container size of a modified layout element given the original container measurement constraints and the measured childSize.

Inherited functions

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

Dp

Dp

Dp

Dp

Public constructors

<init>

LayoutPadding(
    left: Dp = 0.dp,
    top: Dp = 0.dp,
    right: Dp = 0.dp,
    bottom: Dp = 0.dp)

A LayoutModifier that adds left, top, right and bottom padding to the wrapped layout.

Public methods

modifyConstraints

fun DensityScope.modifyConstraints(constraints: Constraints): Constraints

Modifies constraints for performing measurement of the modified layout element.

modifyPosition

fun DensityScope.modifyPosition(
    childSize: IntPxSize,
    containerSize: IntPxSize
): IntPxPosition

Returns the position of a modified child of size childSize within a container of size containerSize.

modifySize

fun DensityScope.modifySize(
    constraints: Constraints,
    childSize: IntPxSize
): IntPxSize

Returns the container size of a modified layout element given the original container measurement constraints and the measured childSize.

Properties

bottom

val bottom: Dp

left

val left: Dp

right

val right: Dp

top

val top: Dp