PrimaryLayoutMargins.Companion


public static class PrimaryLayoutMargins.Companion


Summary

Public methods

static final @NonNull PrimaryLayoutMargins
customizedPrimaryLayoutMargin(
    @FloatRange(from = 0.0, to = 1.0) float start,
    @FloatRange(from = 0.0, to = 1.0) float end
)

Creates new set of margins to be used for primaryLayout customization.

static final @NonNull PrimaryLayoutMargins
customizedPrimaryLayoutMargin(
    @FloatRange(from = 0.0, to = 1.0) float start,
    @FloatRange(from = 0.0, to = 1.0) float end,
    @FloatRange(from = 0.0, to = 1.0) float bottom
)

Creates new set of margins to be used for primaryLayout customization.

Public methods

customizedPrimaryLayoutMargin

Added in 1.3.0-alpha07
public static final @NonNull PrimaryLayoutMargins customizedPrimaryLayoutMargin(
    @FloatRange(from = 0.0, to = 1.0) float start,
    @FloatRange(from = 0.0, to = 1.0) float end
)

Creates new set of margins to be used for primaryLayout customization. The passed in values represent percentages based on the screen width.

It is highly recommended to use predefined values instead of creating this custom one, because they are optimized for different screen sizes, content's corners and slots presences. Those predefined ones are:

Parameters
@FloatRange(from = 0.0, to = 1.0) float start

Percentage of the screen width that should be applied as margin on the start side

@FloatRange(from = 0.0, to = 1.0) float end

Percentage of the screen width that should be applied as margin on the end side

customizedPrimaryLayoutMargin

Added in 1.3.0-alpha07
public static final @NonNull PrimaryLayoutMargins customizedPrimaryLayoutMargin(
    @FloatRange(from = 0.0, to = 1.0) float start,
    @FloatRange(from = 0.0, to = 1.0) float end,
    @FloatRange(from = 0.0, to = 1.0) float bottom
)

Creates new set of margins to be used for primaryLayout customization. The passed in values represent percentages based on the screen width and screen height.

It is highly recommended to use predefined values instead of creating this custom one, because they are optimized for different screen sizes, content's corners and slots presences. Those predefined ones are:

Parameters
@FloatRange(from = 0.0, to = 1.0) float start

Percentage of the screen width that should be applied as margin on the start side

@FloatRange(from = 0.0, to = 1.0) float end

Percentage of the screen width that should be applied as margin on the end side

@FloatRange(from = 0.0, to = 1.0) float bottom

Percentage of the screen height that should be applied as margin on the bottom