PaddingKt

Added in 1.3.0-alpha06

public final class PaddingKt


Summary

Public methods

static final @NonNull ModifiersBuilders.Padding
padding(@Dimension(unit = 0) float all)

Creates a Padding that applies all dp of additional space along each edge of the content, left, top, right and bottom.

static final @NonNull ModifiersBuilders.Padding
padding(
    @Dimension(unit = 0) float horizontal,
    @Dimension(unit = 0) float vertical
)

Creates a Padding that applies horizontal dp of additional space along the left and right edges of the content and vertical dp of additional space along the top and bottom edges of the content.

static final @NonNull LayoutModifier
padding(@NonNull LayoutModifier receiver, @Dimension(unit = 0) float all)

Applies all dp of additional space along each edge of the content, left, top, right and bottom.

static final @NonNull LayoutModifier
padding(
    @NonNull LayoutModifier receiver,
    @NonNull ModifiersBuilders.Padding padding
)

Applies additional space along each edge of the content.

static final @NonNull LayoutModifier
padding(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float horizontal,
    @Dimension(unit = 0) float vertical
)

Applies horizontal dp of additional space along the left and right edges of the content and vertical dp of additional space along the top and bottom edges of the content.

static final @NonNull ModifiersBuilders.Padding
padding(
    @Dimension(unit = 0) float start,
    @Dimension(unit = 0) float top,
    @Dimension(unit = 0) float end,
    @Dimension(unit = 0) float bottom,
    boolean rtlAware
)

Creates a Padding that applies additional space along each edge of the content in DP: start, top, end and bottom

static final @NonNull LayoutModifier
padding(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float start,
    @Dimension(unit = 0) float top,
    @Dimension(unit = 0) float end,
    @Dimension(unit = 0) float bottom,
    boolean rtlAware
)

Applies additional space along each edge of the content in DP: start, top, end and bottom

Public methods

public static final @NonNull ModifiersBuilders.Padding padding(@Dimension(unit = 0) float all)

Creates a Padding that applies all dp of additional space along each edge of the content, left, top, right and bottom.

public static final @NonNull ModifiersBuilders.Padding padding(
    @Dimension(unit = 0) float horizontal,
    @Dimension(unit = 0) float vertical
)

Creates a Padding that applies horizontal dp of additional space along the left and right edges of the content and vertical dp of additional space along the top and bottom edges of the content.

public static final @NonNull LayoutModifier padding(@NonNull LayoutModifier receiver, @Dimension(unit = 0) float all)

Applies all dp of additional space along each edge of the content, left, top, right and bottom.

public static final @NonNull LayoutModifier padding(
    @NonNull LayoutModifier receiver,
    @NonNull ModifiersBuilders.Padding padding
)

Applies additional space along each edge of the content.

public static final @NonNull LayoutModifier padding(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float horizontal,
    @Dimension(unit = 0) float vertical
)

Applies horizontal dp of additional space along the left and right edges of the content and vertical dp of additional space along the top and bottom edges of the content.

public static final @NonNull ModifiersBuilders.Padding padding(
    @Dimension(unit = 0) float start,
    @Dimension(unit = 0) float top,
    @Dimension(unit = 0) float end,
    @Dimension(unit = 0) float bottom,
    boolean rtlAware
)

Creates a Padding that applies additional space along each edge of the content in DP: start, top, end and bottom

Parameters
@Dimension(unit = 0) float start

The padding on the start of the content, depending on the layout direction, in DP and the value of rtlAware.

@Dimension(unit = 0) float top

The padding at the top, in DP.

@Dimension(unit = 0) float end

The padding on the end of the content, depending on the layout direction, in DP and the value of rtlAware.

@Dimension(unit = 0) float bottom

The padding at the bottom, in DP.

boolean rtlAware

specifies whether the start/end padding is aware of RTL support. If true, the values for start/end will follow the layout direction (i.e. start will refer to the right hand side of the container if the device is using an RTL locale). If false, start/end will always map to left/right, accordingly.

public static final @NonNull LayoutModifier padding(
    @NonNull LayoutModifier receiver,
    @Dimension(unit = 0) float start,
    @Dimension(unit = 0) float top,
    @Dimension(unit = 0) float end,
    @Dimension(unit = 0) float bottom,
    boolean rtlAware
)

Applies additional space along each edge of the content in DP: start, top, end and bottom

Parameters
@Dimension(unit = 0) float start

The padding on the start of the content, depending on the layout direction, in DP and the value of rtlAware.

@Dimension(unit = 0) float top

The padding at the top, in DP.

@Dimension(unit = 0) float end

The padding on the end of the content, depending on the layout direction, in DP and the value of rtlAware.

@Dimension(unit = 0) float bottom

The padding at the bottom, in DP.

boolean rtlAware

specifies whether the start/end padding is aware of RTL support. If true, the values for start/end will follow the layout direction (i.e. start will refer to the right hand side of the container if the device is using an RTL locale). If false, start/end will always map to left/right, accordingly.