Dimension

data class Dimension(val dp: Dp, val sizeClass: WindowSizeClass)

Models the dimension properties of the device's screen along one axis, such as either the X axis or Y axis. Two Dimension classes together are used to define the complete dimensions of a screen along both axes.

Parameters

dp

Size of the screen in DPs (density-independent pixels).

sizeClass

Classification of the screen size based on pre-defined breakpoints defined by Google, as followed in ScreenClassifier.

See also

Constructors

Link copied to clipboard
constructor(dp: Dp, sizeClass: WindowSizeClass)

A measurement and classification of the screen size.

Properties

Link copied to clipboard
val dp: Dp

Size of the screen in DPs (density-independent pixels).

Link copied to clipboard

Classification of the screen size based on pre-defined breakpoints defined by Google, as followed in ScreenClassifier.