WindowInsets.Companion


Summary

Extension properties

Boolean

true when the navigationBars are being displayed, irrespective of whether they intersects with the Window.

android
Boolean

true when the statusBars are being displayed, irrespective of whether they intersects with the Window.

android
Boolean

true when the systemBars are being displayed, irrespective of whether they intersects with the Window.

android
WindowInsets

An insets type representing the window of a caption bar.

Cmn
android
WindowInsets

The insets that the WindowInsetsCompat.Type.captionBar will consume if shown.

android
WindowInsets

This WindowInsets represents the area with the display cutout (e.g. for camera).

Cmn
android
WindowInsets

An insets type representing the window of the software keyboard.

Cmn
android
WindowInsets

The WindowInsets for the IME before the IME started animating in.

android
WindowInsets

The WindowInsets for the IME when the animation completes, if it is allowed to complete successfully.

android
Boolean

true when the caption bar is being displayed, irrespective of whether it intersects with the Window.

android
Boolean

true when the soft keyboard is being displayed, irrespective of whether it intersects with the Window.

android
Boolean

true when the tappableElement is being displayed, irrespective of whether they intersects with the Window.

android
WindowInsets

These insets represent the space where system gestures have priority over application gestures.

Cmn
android
WindowInsets

These insets represent where system UI places navigation bars.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.navigationBars will consume if shown.

android
WindowInsets

The insets that include all areas that may be drawn over or have gesture confusion, including everything in safeDrawing and safeGestures.

Cmn
android
WindowInsets

The insets that include areas where content may be covered by other drawn content.

Cmn
android
WindowInsets

The insets that include areas where gestures may be confused with other input, including systemGestures, mandatorySystemGestures, waterfall, and tappableElement.

Cmn
android
WindowInsets

These insets represent status bar.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.statusBars will consume if shown.

android
WindowInsets

These insets represent all system bars.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.systemBars will consume if shown.

android
WindowInsets

The systemGestures insets represent the area of a window where system gestures have priority and may consume some or all touch input, e.g. due to the system bar occupying it, or it being reserved for touch-only gestures.

Cmn
android
WindowInsets

Returns the tappable element insets.

Cmn
android
WindowInsets

The insets that WindowInsetsCompat.Type.tappableElement will consume if active.

android
WindowInsets

The insets for the curved areas in a waterfall display.

Cmn
android

Extension properties

areNavigationBarsVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.areNavigationBarsVisibleBoolean

true when the navigationBars are being displayed, irrespective of whether they intersects with the Window.

areStatusBarsVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.areStatusBarsVisibleBoolean

true when the statusBars are being displayed, irrespective of whether they intersects with the Window.

areSystemBarsVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.areSystemBarsVisibleBoolean

true when the systemBars are being displayed, irrespective of whether they intersects with the Window.

val WindowInsets.Companion.captionBarWindowInsets

An insets type representing the window of a caption bar.

captionBarIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.captionBarIgnoringVisibilityWindowInsets

The insets that the WindowInsetsCompat.Type.captionBar will consume if shown. If it cannot be shown then this will be empty.

displayCutout

val WindowInsets.Companion.displayCutoutWindowInsets

This WindowInsets represents the area with the display cutout (e.g. for camera).

val WindowInsets.Companion.imeWindowInsets

An insets type representing the window of the software keyboard.

imeAnimationSource

@ExperimentalLayoutApi
val WindowInsets.Companion.imeAnimationSourceWindowInsets

The WindowInsets for the IME before the IME started animating in. The current animated value is WindowInsets.Companion.ime.

This will be the same as imeAnimationTarget when there is no IME animation in progress.

imeAnimationTarget

@ExperimentalLayoutApi
val WindowInsets.Companion.imeAnimationTargetWindowInsets

The WindowInsets for the IME when the animation completes, if it is allowed to complete successfully. The current animated value is WindowInsets.Companion.ime.

This will be the same as imeAnimationSource when there is no IME animation in progress.

isCaptionBarVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.isCaptionBarVisibleBoolean

true when the caption bar is being displayed, irrespective of whether it intersects with the Window.

@ExperimentalLayoutApi
val WindowInsets.Companion.isImeVisibleBoolean

true when the soft keyboard is being displayed, irrespective of whether it intersects with the Window.

isTappableElementVisible

@ExperimentalLayoutApi
val WindowInsets.Companion.isTappableElementVisibleBoolean

true when the tappableElement is being displayed, irrespective of whether they intersects with the Window.

mandatorySystemGestures

val WindowInsets.Companion.mandatorySystemGesturesWindowInsets

These insets represent the space where system gestures have priority over application gestures.

navigationBars

val WindowInsets.Companion.navigationBarsWindowInsets

These insets represent where system UI places navigation bars. Interactive UI should avoid the navigation bars area.

navigationBarsIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.navigationBarsIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.navigationBars will consume if shown. These insets represent where system UI places navigation bars. Interactive UI should avoid the navigation bars area. If navigation bars cannot be shown, then this will be empty.

val WindowInsets.Companion.safeContentWindowInsets

The insets that include all areas that may be drawn over or have gesture confusion, including everything in safeDrawing and safeGestures.

val WindowInsets.Companion.safeDrawingWindowInsets

The insets that include areas where content may be covered by other drawn content. This includes all systemBars, displayCutout, and ime.

safeGestures

val WindowInsets.Companion.safeGesturesWindowInsets

The insets that include areas where gestures may be confused with other input, including systemGestures, mandatorySystemGestures, waterfall, and tappableElement.

val WindowInsets.Companion.statusBarsWindowInsets

These insets represent status bar.

statusBarsIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.statusBarsIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.statusBars will consume if shown. If the status bar can never be shown, then this will be empty.

val WindowInsets.Companion.systemBarsWindowInsets

These insets represent all system bars. Includes statusBars, captionBar as well as navigationBars, but not ime.

systemBarsIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.systemBarsIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.systemBars will consume if shown.

If system bars can never be shown, then this will be empty.

systemGestures

val WindowInsets.Companion.systemGesturesWindowInsets

The systemGestures insets represent the area of a window where system gestures have priority and may consume some or all touch input, e.g. due to the system bar occupying it, or it being reserved for touch-only gestures.

tappableElement

val WindowInsets.Companion.tappableElementWindowInsets

Returns the tappable element insets.

tappableElementIgnoringVisibility

@ExperimentalLayoutApi
val WindowInsets.Companion.tappableElementIgnoringVisibilityWindowInsets

The insets that WindowInsetsCompat.Type.tappableElement will consume if active.

If there are never tappable elements then this is empty.

val WindowInsets.Companion.waterfallWindowInsets

The insets for the curved areas in a waterfall display.