🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

WindowInsets

A representation of window insets that tracks access to enable recomposition, relayout, and redrawing when values change.

Source set: Common
public interface WindowInsets

A representation of window insets that tracks access to enable recomposition, relayout, and redrawing when values change. These values should not be read during composition to avoid doing composition for every frame of an animation. Use methods like Modifier.windowInsetsPadding, Modifier.systemBarsPadding, and Modifier.windowInsetsTopHeight for Modifiers that will not cause recomposition when values change.

Use the WindowInsets.Companion extensions to retrieve WindowInsets for the current window.

Functions

getLeft

Source set: Common
public fun getLeft(density: Density, layoutDirection: LayoutDirection): Int

The space, in pixels, at the left of the window that the inset represents.

getTop

Source set: Common
public fun getTop(density: Density): Int

The space, in pixels, at the top of the window that the inset represents.

getRight

Source set: Common
public fun getRight(density: Density, layoutDirection: LayoutDirection): Int

The space, in pixels, at the right of the window that the inset represents.

getBottom

Source set: Common
public fun getBottom(density: Density): Int

The space, in pixels, at the bottom of the window that the inset represents.

Members

Companion

Source set: Common
public companion object