-
public final class WindowInsetsKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static ProvidableCompositionLocal<WindowInsets>LocalWindowInsets
-
Method Summary
Modifier and Type Method Description final ProvidableCompositionLocal<WindowInsets>getLocalWindowInsets()Composition local containing the current WindowInsets. final static UnitProvideWindowInsets(Boolean consumeWindowInsets, Boolean windowInsetsAnimationsEnabled, Function0<Unit> content)Applies any WindowInsetsCompat values to LocalWindowInsets, which are then available within content. -
-
Method Detail
-
getLocalWindowInsets
final ProvidableCompositionLocal<WindowInsets> getLocalWindowInsets()
Composition local containing the current WindowInsets.
-
ProvideWindowInsets
final static Unit ProvideWindowInsets(Boolean consumeWindowInsets, Boolean windowInsetsAnimationsEnabled, Function0<Unit> content)
Applies any WindowInsetsCompat values to LocalWindowInsets, which are then available within content.
If you're using this in fragments, you may wish to take a look at ViewWindowInsetObserver for a more optimal solution.
- Parameters:
consumeWindowInsets- Whether to consume any WindowInsetsCompats which are dispatched to the host view.windowInsetsAnimationsEnabled- Whether to listen for WindowInsetsAnimations, such as IME animations.
-
-
-
-