Google 致力于为黑人社区推动种族平等。查看具体举措

WindowInsetsCompat

open class WindowInsetsCompat
kotlin.Any
   ↳ 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

Builder for WindowInsetsCompat.

Class that defines different types of sources causing window insets.

Public constructors
<init>(@Nullable src: WindowInsetsCompat?)

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

Public methods
open WindowInsetsCompat

Returns a copy of this WindowInsets with the cutout fully consumed.

open WindowInsetsCompat

Returns a copy of this WindowInsets with the stable insets fully consumed.

open WindowInsetsCompat

Returns a copy of this WindowInsets with the system window insets fully consumed.

open Boolean
equals(other: Any?)

open DisplayCutoutCompat?

Returns the display cutout if there is one.

open Insets
getInsets(typeMask: Int)

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

open Insets

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

open Insets

Returns the mandatory system gesture insets.

open Int

Returns the bottom stable inset in pixels.

open Int

Returns the left stable inset in pixels.

open Int

Returns the right stable inset in pixels.

open Int

Returns the top stable inset in pixels.

open Insets

Returns the stable insets in pixels.

open Insets

Returns the system gesture insets.

open Int

Returns the bottom system window inset in pixels.

open Int

Returns the left system window inset in pixels.

open Int

Returns the right system window inset in pixels.

open Int

Returns the top system window inset in pixels.

open Insets

Returns the system window insets in pixels.

open Insets

Returns the tappable element insets.

open Boolean

Returns true if this WindowInsets has any non-zero insets.

open Boolean

Returns true if this WindowInsets has nonzero stable insets.

open Boolean

Returns true if this WindowInsets has nonzero system window insets.

open Int

open WindowInsetsCompat
inset(@NonNull insets: Insets)

Returns a copy of this instance inset in the given directions.

open WindowInsetsCompat
inset(@IntRange(0) left: Int, @IntRange(0) top: Int, @IntRange(0) right: Int, @IntRange(0) bottom: Int)

Returns a copy of this instance inset in the given directions.

open Boolean

Check if these insets have been fully consumed.

open Boolean

Returns true if the associated window has a round shape.

open Boolean
isVisible(typeMask: Int)

Returns whether a set of windows that may cause insets is currently visible on screen, regardless of whether it actually overlaps with this window.

open WindowInsetsCompat
replaceSystemWindowInsets(left: Int, top: Int, right: Int, bottom: Int)

Returns a copy of this WindowInsets with selected system window insets replaced with new values.

open WindowInsetsCompat
replaceSystemWindowInsets(@NonNull systemWindowInsets: Rect)

Returns a copy of this WindowInsets with selected system window insets replaced with new values.

open WindowInsets?

Return the source WindowInsets instance used in this WindowInsetsCompat.

open static WindowInsetsCompat