Function

absolutePadding

Apply additional space along each edge of the content in Dp: left, top, right, bottom, front and back.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

absolutePadding

Android
public fun SubspaceModifier.absolutePadding(
    left: Dp = 0.dp,
    top: Dp = 0.dp,
    right: Dp = 0.dp,
    bottom: Dp = 0.dp,
    front: Dp = 0.dp,
    back: Dp = 0.dp,
): SubspaceModifier

Apply additional space along each edge of the content in Dp: left, top, right, bottom, front and back. Padding is applied before content measurement and takes precedence; content may only be as large as the remaining space. To apply relative padding with layout direction, see padding.

Negative padding is not permitted — it will cause IllegalArgumentException.

Parameters

left The amount of space at the left edge of the content.
top The amount of space at the top edge of the content.
right The amount of space at the right edge of the content.
bottom The amount of space at the bottom edge of the content.
front The amount of space at the front edge of the content.
back The amount of space at the back edge of the content.