Android 12 Developer Preview is here! Try it out, and give us your feedback!

WindowLayoutInfo

class WindowLayoutInfo
kotlin.Any
   ↳ androidx.window.WindowLayoutInfo

Contains the list of DisplayFeature-s located within the window. For example, a hinge or display fold can go across the window, in which case it might make sense to separate the visual content and interactive elements into two groups, e.g. list-detail or view-controls.

Only the features that are present within the current window bounds are reported. Their positions and sizes can change if the window is moved or resized on screen.

Summary

Nested classes

Builder for WindowLayoutInfo objects.

Public methods
Boolean
equals(other: Any?)

MutableList<DisplayFeature!>

Gets the list of physical display features within the window.

Int

String

Public methods

equals

fun equals(other: Any?): Boolean

getDisplayFeatures

@NonNull fun getDisplayFeatures(): MutableList<DisplayFeature!>

Gets the list of physical display features within the window.

hashCode

fun hashCode(): Int

toString

@NonNull fun toString(): String