WindowInsets


public final class WindowInsets
extends Object

java.lang.Object
   ↳ android.view.WindowInsets


Describes a set of insets for window content.

WindowInsets are immutable and may be expanded to include more inset types in the future. To adjust insets, use one of the supplied clone methods to obtain a new WindowInsets instance with the adjusted properties.

Note: Before P, WindowInsets instances were only immutable during a single layout pass (i.e. would return the same values between View.onApplyWindowInsets and View.onLayout, but could return other values otherwise). Starting with P, WindowInsets are always immutable and implement equality.

Summary

Nested classes

class WindowInsets.Builder

Builder for WindowInsets. 

class WindowInsets.Side

Class that defines different sides for insets. 

class WindowInsets.Type

Class that defines different types of sources causing window insets. 

Fields

public static final WindowInsets CONSUMED

A WindowInsets instance for which isConsumed() returns true.