abstract class PrimaryLayoutMargins


The set of margins for the primaryLayout's customization.

It is highly recommended to use these predefined values that are optimized for different screen sizes, content's corners and slots presences. Those are:

Summary

Public companion functions

PrimaryLayoutMargins
customizedPrimaryLayoutMargin(
    start: @FloatRange(from = 0.0, to = 1.0) Float,
    end: @FloatRange(from = 0.0, to = 1.0) Float
)

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

PrimaryLayoutMargins
customizedPrimaryLayoutMargin(
    start: @FloatRange(from = 0.0, to = 1.0) Float,
    end: @FloatRange(from = 0.0, to = 1.0) Float,
    bottom: @FloatRange(from = 0.0, to = 1.0) Float
)

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

Public companion properties

PrimaryLayoutMargins

Default side margins for the main slot of primaryLayout that works for the majority of Shapes inside the main content components, usually across round toward medium round corners.

PrimaryLayoutMargins

Max side margins for the main slot of primaryLayout that should be used when the main slot contains content components with square corners, for example, smaller than Shapes.medium to avoid clipping.

PrimaryLayoutMargins

Mid side margins for the main slot of primaryLayout that should be used when the main slot contains content components with fully rounded to medium round corners, for example, larger than Shapes.medium to avoid clipping.

PrimaryLayoutMargins

Min side margins for the main slot of primaryLayout that should be used only when the main slot contains content components with fully rounded corners, such as Shapes.full to avoid clipping.

Public companion functions

customizedPrimaryLayoutMargin

Added in 1.3.0-alpha07
fun customizedPrimaryLayoutMargin(
    start: @FloatRange(from = 0.0, to = 1.0) Float,
    end: @FloatRange(from = 0.0, to = 1.0) Float
): PrimaryLayoutMargins

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
start: @FloatRange(from = 0.0, to = 1.0) Float

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

end: @FloatRange(from = 0.0, to = 1.0) Float

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

customizedPrimaryLayoutMargin

Added in 1.3.0-alpha07
fun customizedPrimaryLayoutMargin(
    start: @FloatRange(from = 0.0, to = 1.0) Float,
    end: @FloatRange(from = 0.0, to = 1.0) Float,
    bottom: @FloatRange(from = 0.0, to = 1.0) Float
): PrimaryLayoutMargins

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
start: @FloatRange(from = 0.0, to = 1.0) Float

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

end: @FloatRange(from = 0.0, to = 1.0) Float

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

bottom: @FloatRange(from = 0.0, to = 1.0) Float

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

Public companion properties

DEFAULT_PRIMARY_LAYOUT_MARGIN

val DEFAULT_PRIMARY_LAYOUT_MARGINPrimaryLayoutMargins

Default side margins for the main slot of primaryLayout that works for the majority of Shapes inside the main content components, usually across round toward medium round corners.

The actual returned values depend on presence of slots in primaryLayout which will be applied automatically.

MAX_PRIMARY_LAYOUT_MARGIN

val MAX_PRIMARY_LAYOUT_MARGINPrimaryLayoutMargins

Max side margins for the main slot of primaryLayout that should be used when the main slot contains content components with square corners, for example, smaller than Shapes.medium to avoid clipping.

The actual returned values depend on presence of slots in primaryLayout which will be applied automatically.

MID_PRIMARY_LAYOUT_MARGIN

val MID_PRIMARY_LAYOUT_MARGINPrimaryLayoutMargins

Mid side margins for the main slot of primaryLayout that should be used when the main slot contains content components with fully rounded to medium round corners, for example, larger than Shapes.medium to avoid clipping.

The actual returned values depend on presence of slots in primaryLayout which will be applied automatically.

MIN_PRIMARY_LAYOUT_MARGIN

val MIN_PRIMARY_LAYOUT_MARGINPrimaryLayoutMargins

Min side margins for the main slot of primaryLayout that should be used only when the main slot contains content components with fully rounded corners, such as Shapes.full to avoid clipping.

The actual returned values depend on presence of slots in primaryLayout which will be applied automatically.