{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

AndroidCompositionLocalsKt

public final class AndroidCompositionLocalsKt


Summary

Public methods

static final @NonNull ProvidableCompositionLocal<@NonNull Configuration>

The Android Configuration.

static final @NonNull ProvidableCompositionLocal<@NonNull Context>

Provides a Context that can be used by Android applications.

static final @NonNull ProvidableCompositionLocal<@NonNull LifecycleOwner>

The CompositionLocal containing the current LifecycleOwner.

static final @NonNull ProvidableCompositionLocal<@NonNull SavedStateRegistryOwner>

The CompositionLocal containing the current SavedStateRegistryOwner.

static final @NonNull ProvidableCompositionLocal<@NonNull View>

The CompositionLocal containing the current Compose View.

Public methods

getLocalConfiguration

public static final @NonNull ProvidableCompositionLocal<@NonNull ConfigurationgetLocalConfiguration()

The Android Configuration. The Configuration is useful for determining how to organize the UI.

getLocalContext

public static final @NonNull ProvidableCompositionLocal<@NonNull ContextgetLocalContext()

Provides a Context that can be used by Android applications.

getLocalLifecycleOwner

public static final @NonNull ProvidableCompositionLocal<@NonNull LifecycleOwnergetLocalLifecycleOwner()

The CompositionLocal containing the current LifecycleOwner.

getLocalSavedStateRegistryOwner

public static final @NonNull ProvidableCompositionLocal<@NonNull SavedStateRegistryOwnergetLocalSavedStateRegistryOwner()

The CompositionLocal containing the current SavedStateRegistryOwner.

getLocalView

public static final @NonNull ProvidableCompositionLocal<@NonNull ViewgetLocalView()

The CompositionLocal containing the current Compose View.