PaddingValues
-
Cmn
interface PaddingValues
PaddingValues.Absolute |
Describes an absolute (RTL unaware) padding to be applied along the edges inside a box. |
Describes a padding to be applied along the edges inside a box. See the PaddingValues factories and Absolute for convenient ways to build PaddingValues.
Summary
Nested types |
|---|
class PaddingValues.Absolute : PaddingValuesDescribes an absolute (RTL unaware) padding to be applied along the edges inside a box. |
Public companion properties |
||
|---|---|---|
PaddingValues |
PaddingValues with all values |
Cmn
|
Public functions |
||
|---|---|---|
Dp |
The padding to be applied along the bottom edge inside a box. |
Cmn
|
Dp |
calculateLeftPadding(layoutDirection: LayoutDirection)The padding to be applied along the left edge inside a box. |
Cmn
|
Dp |
calculateRightPadding(layoutDirection: LayoutDirection)The padding to be applied along the right edge inside a box. |
Cmn
|
Dp |
The padding to be applied along the top edge inside a box. |
Cmn
|
Extension functions |
||
|---|---|---|
Dp |
PaddingValues.calculateEndPadding(layoutDirection: LayoutDirection)The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL. |
Cmn
|
Dp |
PaddingValues.calculateStartPadding(layoutDirection: LayoutDirection)The padding to be applied along the start edge inside a box: along the left edge if the layout direction is LTR, or along the right edge for RTL. |
Cmn
|
operator PaddingValues |
PaddingValues.minus(other: PaddingValues)Subtracts a |
Cmn
|
operator PaddingValues |
PaddingValues.plus(other: PaddingValues)Adds two |
Cmn
|
Public companion properties
Public functions
calculateBottomPadding
fun calculateBottomPadding(): Dp
The padding to be applied along the bottom edge inside a box.
calculateLeftPadding
fun calculateLeftPadding(layoutDirection: LayoutDirection): Dp
The padding to be applied along the left edge inside a box.
calculateRightPadding
fun calculateRightPadding(layoutDirection: LayoutDirection): Dp
The padding to be applied along the right edge inside a box.
calculateTopPadding
fun calculateTopPadding(): Dp
The padding to be applied along the top edge inside a box.
Extension functions
calculateEndPadding
fun PaddingValues.calculateEndPadding(layoutDirection: LayoutDirection): Dp
The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL.
calculateStartPadding
fun PaddingValues.calculateStartPadding(layoutDirection: LayoutDirection): Dp
The padding to be applied along the start edge inside a box: along the left edge if the layout direction is LTR, or along the right edge for RTL.
minus
operator fun PaddingValues.minus(other: PaddingValues): PaddingValues
Subtracts a PaddingValues from another one and ensures that the result is non-negative.
plus
operator fun PaddingValues.plus(other: PaddingValues): PaddingValues
Adds two PaddingValues together.