WindowInsetsCompat

public class WindowInsetsCompat
extends Object

java.lang.Object
   ↳ androidx.core.view.WindowInsetsCompat


Describes a set of insets for window content.

WindowInsetsCompats 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 WindowInsetsCompat instance with the adjusted properties.

Summary

Nested classes

class WindowInsetsCompat.Builder

Builder for WindowInsetsCompat

class WindowInsetsCompat.Type

Class that defines different types of sources causing window insets. 

Fields

public static final WindowInsetsCompat CONSUMED

A WindowInsetsCompat instance for which isConsumed() returns true.

Public constructors

WindowInsetsCompat(WindowInsetsCompat src)

Constructs a new WindowInsetsCompat, copying all values from a source WindowInsetsCompat.

Public methods

WindowInsetsCompat consumeDisplayCutout()

This method is deprecated. Consuming of different parts individually of a WindowInsetsCompat instance is deprecated, since WindowInsetsCompat contains many different insets. Use CONSUMED instead to stop dispatching insets.

WindowInsetsCompat consumeStableInsets()

This method is deprecated. Consuming of different parts individually of a WindowInsetsCompat instance is deprecated, since WindowInsetsCompat contains many different insets. Use CONSUMED instead to stop dispatching insets.

WindowInsetsCompat consumeSystemWindowInsets()

This method is deprecated. Consuming of different parts individually of a WindowInsetsCompat instance is deprecated, since WindowInsetsCompat contains many different insets. Use CONSUMED instead to stop dispatching insets.

boolean equals(Object o)
DisplayCutoutCompat getDisplayCutout()

Returns the display cutout if there is one.

Insets getInsets(int typeMask)

Returns the insets of a specific set of windows causing insets, denoted by the typeMask bit mask of WindowInsetsCompat.Types.

Insets getInsetsIgnoringVisibility(int typeMask)

Returns the insets a specific set of windows can cause, denoted by the typeMask bit mask of WindowInsetsCompat.Types, regardless of whether that type is currently visible or not.

Insets getMandatorySystemGestureInsets()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.mandatorySystemGestures() instead.

int getStableInsetBottom()

This method is deprecated. Use getInsetsIgnoringVisibility(int) with WindowInsetsCompat.Type.systemBars() instead.

int getStableInsetLeft()

This method is deprecated. Use getInsetsIgnoringVisibility(int) with WindowInsetsCompat.Type.systemBars() instead.

int getStableInsetRight()

This method is deprecated. Use getInsetsIgnoringVisibility(int) with WindowInsetsCompat.Type.systemBars() instead.

int getStableInsetTop()

This method is deprecated. Use getInsetsIgnoringVisibility(int) with WindowInsetsCompat.Type.systemBars() instead.

Insets getStableInsets()

This method is deprecated. Use getInsetsIgnoringVisibility(int) with WindowInsetsCompat.Type.systemBars() instead.

Insets getSystemGestureInsets()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.systemGestures() instead.

int getSystemWindowInsetBottom()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.systemBars() instead.

int getSystemWindowInsetLeft()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.systemBars() instead.

int getSystemWindowInsetRight()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.systemBars() instead.

int getSystemWindowInsetTop()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.systemBars() instead.

Insets getSystemWindowInsets()

This method is deprecated. Use getInsets(int) with WindowInsetsCompat.Type.systemBars() instead.