Height-based window size class.

A window size class represents a breakpoint that can be used to build responsive layouts. Each window size class breakpoint represents a majority case for typical device scenarios so your layouts will work well on most devices and configurations.

For more details see Window size classes documentation.

Summary

Public companion properties

Set<WindowHeightSizeClass>

The set of all size classes.

Cmn
WindowHeightSizeClass

Represents the majority of phones in landscape

Cmn
Set<WindowHeightSizeClass>

The default set of size classes that includes Compact, Medium, and Expanded size classes.

Cmn
WindowHeightSizeClass

Represents the majority of tablets in portrait

Cmn
WindowHeightSizeClass

Represents the majority of tablets in landscape and majority of phones in portrait

Cmn

Public functions

open operator Int
Cmn
open String
Cmn

Public companion properties

AllSizeClasses

val AllSizeClassesSet<WindowHeightSizeClass>

The set of all size classes. It's supposed to be expanded whenever a new size class is defined. By default WindowSizeClass.calculateFromSize will only return size classes in DefaultSizeClasses in order to avoid behavioral changes when new size classes are added. You can opt in to support all available size classes by doing:

WindowSizeClass.calculateFromSize(
size = size,
density = density,
supportedWidthSizeClasses = WindowWidthSizeClass.AllSizeClasses,
supportedHeightSizeClasses = WindowHeightSizeClass.AllSizeClasses
)

Compact

val CompactWindowHeightSizeClass

Represents the majority of phones in landscape

DefaultSizeClasses

val DefaultSizeClassesSet<WindowHeightSizeClass>

The default set of size classes that includes Compact, Medium, and Expanded size classes. Should never expand to ensure behavioral consistency.

Expanded

val ExpandedWindowHeightSizeClass

Represents the majority of tablets in portrait

Medium

val MediumWindowHeightSizeClass

Represents the majority of tablets in landscape and majority of phones in portrait

Public functions

compareTo

open operator fun compareTo(other: WindowHeightSizeClass): Int

toString

open fun toString(): String