androidx.compose.foundation.layout

PaddingValues

Interface · from org.jetbrains.compose.foundation:foundation-layout:1.12.2

No hand-written docs yet.

Describes a padding to be applied along the edges inside a box. See the PaddingValues factories and Absolute for convenient ways to build PaddingValues.

interface PaddingValues

Kinds of PaddingValues

Anywhere a PaddingValues is expected, you can pass any of these.

How to get one

Create it

Ready-made values and functions that return it

Or create one of the kinds listed above.

Used by

Parameters that take a PaddingValues.

35 more

Properties

ZeroSince 1.9

val Zero: PaddingValues

PaddingValues with all values 0.dp.

Functions

calculateLeftPadding

fun calculateLeftPadding(layoutDirection: LayoutDirection): Dp

The padding to be applied along the left edge inside a box.

calculateTopPadding

fun calculateTopPadding(): Dp

The padding to be applied along the top edge inside a box.

calculateRightPadding

fun calculateRightPadding(layoutDirection: LayoutDirection): Dp

The padding to be applied along the right edge inside a box.

calculateBottomPadding

fun calculateBottomPadding(): Dp

The padding to be applied along the bottom edge inside a box.

Nested types

Library docs

Describes a padding to be applied along the edges inside a box. See the PaddingValues factories and Absolute for convenient ways to build PaddingValues.