{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

WindowSizeClass

public final class WindowSizeClass


Window size classes are a set of opinionated viewport breakpoints to design, develop, and test responsive application layouts against. For more details check Support different screen sizes documentation.

WindowSizeClass contains a WindowWidthSizeClass and WindowHeightSizeClass, representing the window size classes for this window's width and height respectively.

See calculateWindowSizeClass to calculate the WindowSizeClass for an Activity's current window

Summary

Nested types

public static class WindowSizeClass.Companion

Public methods

boolean
equals(Object other)
final @NonNull WindowHeightSizeClass

height-based window size class (WindowHeightSizeClass)

final @NonNull WindowWidthSizeClass

width-based window size class (WindowWidthSizeClass)

int
@NonNull String

Public methods

equals

public boolean equals(Object other)

getHeightSizeClass

public final @NonNull WindowHeightSizeClass getHeightSizeClass()

height-based window size class (WindowHeightSizeClass)

getWidthSizeClass

public final @NonNull WindowWidthSizeClass getWidthSizeClass()

width-based window size class (WindowWidthSizeClass)

hashCode

public int hashCode()

toString

public @NonNull String toString()