🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

WindowHeightSizeClass

Height-based window size class.

Source set: Common
public class WindowHeightSizeClass private constructor(private val value: Int) :
    Comparable<WindowHeightSizeClass>

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.

Functions

compareTo

Source set: Common
override operator fun compareTo(other: WindowHeightSizeClass): Int

toString

Source set: Common
override fun toString(): String

Members

Companion

Source set: Common
public companion object

Properties

Compact

Source set: Common
public val Compact: WindowHeightSizeClass = WindowHeightSizeClass(0)

Represents the majority of phones in landscape

Medium

Source set: Common
public val Medium: WindowHeightSizeClass = WindowHeightSizeClass(1)

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

Expanded

Source set: Common
public val Expanded: WindowHeightSizeClass = WindowHeightSizeClass(2)

Represents the majority of tablets in portrait

DefaultSizeClasses

Source set: Common
public val DefaultSizeClasses: Set<WindowHeightSizeClass> = setOf(Compact, Medium, Expanded)

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

AllSizeClasses

Source set: Common
public val AllSizeClasses: Set<WindowHeightSizeClass> = AllSizeClassList.toSet()

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
)

Content updated: