Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

androidx.compose.ui.platform

Interfaces

AndroidOwner

Interface to be implemented by Owners able to handle Android View specific functionality.

ClipboardManager

Interface for managing the Clipboard.

InspectableValue

A compose value that is inspectable by tools.

TextToolbar

Interface for text-related toolbar.

UriHandler

An interface of providing platform specific URL handling.

ViewConfiguration

Contains methods to standard constants used in the UI for timeouts, sizes, and distances.

WindowManager

Provides information about the Window that is hosting this compose hierarchy.

Classes

AbstractComposeView

Base class for custom android.view.Views implemented using Jetpack Compose UI.

AndroidUriHandler

AndroidViewConfiguration

AtomicInt

ComposeView

A android.view.View that can host Jetpack Compose UI content.

InspectorInfo

A builder for an InspectableValue.

InspectorValueInfo

Implementation of InspectableValue based on a builder InspectorInfo DSL.

ValueElement

A ValueElement describes an element of a compose value instance.

ValueElementSequence

A builder for a sequence of ValueElement.

Enums

TextToolbarStatus

Status of the TextToolbar.

Top-level functions summary

Unit
WindowFocusObserver(onWindowFocusChanged: (isWindowFocused: Boolean) -> Unit)

Provides a callback that is called whenever the window gains or loses focus.

InspectorInfo.() -> Unit
debugInspectorInfo(crossinline definitions: InspectorInfo.() -> Unit)

Factory method for avoiding DSL allocation when no debug inspector info is needed.

Composition
subcomposeInto(container: LayoutNode, parent: CompositionReference, composable: () -> Unit)

Top-level properties summary

ProvidableAmbient<AnimationClockObservable>

The default animation clock used for animations when an explicit clock isn't provided.

ProvidableAmbient<Autofill?>

The ambient that can be used to trigger autofill actions.

ProvidableAmbient<AutofillTree>

The ambient that can be used to add AutofillNodes to the autofill tree.

ProvidableAmbient<ClipboardManager>

The ambient to provide communication with platform clipboard service.

ProvidableAmbient<Configuration>

The Android Configuration.

ProvidableAmbient<Context>

Provides a Context that can be used by Android applications.

ProvidableAmbient<Density>

Provides the Density to be used to transform between density-independent pixelunits (DP) and pixel units or scale-independent pixel units (SP) and pixel units.

ProvidableAmbient<FocusManager>

The ambient that can be used to control focus within Compose.

ProvidableAmbient<HapticFeedback>

The ambient to provide haptic feedback to the user.

ProvidableAmbient<LayoutDirection>

The ambient to provide the layout direction.

ProvidableAmbient<LifecycleOwner>

The ambient containing the current LifecycleOwner.

ProvidableAmbient<TextInputService?>

The ambient to provide communication with platform text input service.

ProvidableAmbient<TextToolbar>

The ambient to provide text-related toolbar.

ProvidableAmbient<UriHandler>

The ambient to provide functionality related to URL, e.

ProvidableAmbient<View>

The ambient containing the current Compose View.

ProvidableAmbient<ViewConfiguration>

The ambient that provides the ViewConfiguration.

ProvidableAmbient<ViewModelStoreOwner>

The ambient containing the current ViewModelStoreOwner.

ProvidableAmbient<WindowManager>

The ambient that provides information about the window that hosts the current Owner.

ProvidableAmbient<AnimationClockObservable>

The default animation clock used for animations when an explicit clock isn't provided.

ProvidableAmbient<Autofill?>

The ambient that can be used to trigger autofill actions.

ProvidableAmbient<AutofillTree>

The ambient that can be used to add AutofillNodes to the autofill tree.

ProvidableAmbient<ClipboardManager>

The ambient to provide communication with platform clipboard service.

ProvidableAmbient<Configuration>

The Android Configuration.

ProvidableAmbient<Context>

Provides a Context that can be used by Android applications.

ProvidableAmbient<Density>

Provides the Density to be used to transform between density-independent pixelunits (DP) and pixel units or scale-independent pixel units (SP) and pixel units.

ProvidableAmbient<FocusManager>

The ambient that can be used to control focus within Compose.

ProvidableAmbient<HapticFeedback>

The ambient to provide haptic feedback to the user.

ProvidableAmbient<Boolean>

Inspectable mode ambient.

ProvidableAmbient<LayoutDirection>

The ambient to provide the layout direction.

ProvidableAmbient<LifecycleOwner>

The ambient containing the current LifecycleOwner.

InspectorInfo.() -> Unit

An empty InspectorInfo DSL.

ProvidableAmbient<TextInputService?>

The ambient to provide communication with platform text input service.

ProvidableAmbient<TextToolbar>

The ambient to provide text-related toolbar.

ProvidableAmbient<UriHandler>

The ambient to provide functionality related to URL, e.

ProvidableAmbient<View>

The ambient containing the current Compose View.

ProvidableAmbient<ViewConfiguration>

The ambient that provides the ViewConfiguration.

ProvidableAmbient<ViewModelStoreOwner>

The ambient containing the current ViewModelStoreOwner.

Boolean

Turn on inspector debug information.

Extension functions summary

For android.app.Activity
Composition
Activity.setViewContent(composable: () -> Unit)

Sets the contentView of an activity to a FrameLayout, and composes the contents of the layout with the passed in composable.

For android.view.ViewGroup
Composition
ViewGroup.setContent(parent: CompositionReference = Recomposer.current(), content: () -> Unit)

Composes the given composable into the given view.

Composition
ViewGroup.setViewContent(parent: CompositionReference = Recomposer.current(), composable: () -> Unit)

Composes the children of the view with the passed in composable.

For ComponentActivity
Composition
ComponentActivity.setContent(parent: CompositionReference = Recomposer.current(), content: () -> Unit)

Composes the given composable into the given activity.

For Modifier
Modifier

Applies a tag to allow modified element to be found in tests.

Top-level functions

WindowFocusObserver

@Composable fun WindowFocusObserver(onWindowFocusChanged: (isWindowFocused: Boolean) -> Unit): Unit

Provides a callback that is called whenever the window gains or loses focus.

debugInspectorInfo

inline fun debugInspectorInfo(crossinline definitions: InspectorInfo.() -> Unit): InspectorInfo.() -> Unit

Factory method for avoiding DSL allocation when no debug inspector info is needed.

subcomposeInto

@MainThread fun subcomposeInto(
    container: LayoutNode,
    parent: CompositionReference,
    composable: () -> Unit
): Composition

Top-level properties

AmbientAnimationClock

val AmbientAnimationClock: ProvidableAmbient<AnimationClockObservable>

The default animation clock used for animations when an explicit clock isn't provided.

AmbientAutofill

val AmbientAutofill: ProvidableAmbient<Autofill?>

The ambient that can be used to trigger autofill actions. Eg. Autofill.requestAutofillForNode.

AmbientAutofillTree

val AmbientAutofillTree: ProvidableAmbient<AutofillTree>

The ambient that can be used to add AutofillNodes to the autofill tree. The AutofillTree is a temporary data structure that will be replaced by Autofill Semantics (b/138604305).

AmbientClipboardManager

val AmbientClipboardManager: ProvidableAmbient<ClipboardManager>

The ambient to provide communication with platform clipboard service.

AmbientConfiguration

val AmbientConfiguration: ProvidableAmbient<Configuration>

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

AmbientContext

val AmbientContext: ProvidableAmbient<Context>

Provides a Context that can be used by Android applications.

AmbientDensity

val AmbientDensity: ProvidableAmbient<Density>

Provides the Density to be used to transform between density-independent pixelunits (DP) and pixel units or scale-independent pixel units (SP) and pixel units. This is typically used when a DP is provided and it must be converted in the body of Layout or DrawModifier.

AmbientFocusManager

val AmbientFocusManager: ProvidableAmbient<FocusManager>

The ambient that can be used to control focus within Compose.

AmbientHapticFeedback

val AmbientHapticFeedback: ProvidableAmbient<HapticFeedback>

The ambient to provide haptic feedback to the user.

AmbientLayoutDirection

val AmbientLayoutDirection: ProvidableAmbient<LayoutDirection>

The ambient to provide the layout direction.

AmbientLifecycleOwner

val AmbientLifecycleOwner: ProvidableAmbient<LifecycleOwner>

The ambient containing the current LifecycleOwner.

AmbientTextInputService

val AmbientTextInputService: ProvidableAmbient<TextInputService?>

The ambient to provide communication with platform text input service.

AmbientTextToolbar

val AmbientTextToolbar: ProvidableAmbient<TextToolbar>

The ambient to provide text-related toolbar.

AmbientUriHandler

val AmbientUriHandler: ProvidableAmbient<UriHandler>

The ambient to provide functionality related to URL, e.g. open URI.

AmbientView

val AmbientView: ProvidableAmbient<View>

The ambient containing the current Compose View.

AmbientViewConfiguration

val AmbientViewConfiguration: ProvidableAmbient<ViewConfiguration>

The ambient that provides the ViewConfiguration.

AmbientViewModelStoreOwner

val AmbientViewModelStoreOwner: ProvidableAmbient<ViewModelStoreOwner>

The ambient containing the current ViewModelStoreOwner.

AmbientWindowManager

val AmbientWindowManager: ProvidableAmbient<WindowManager>

The ambient that provides information about the window that hosts the current Owner.

AnimationClockAmbient

val AnimationClockAmbient: ProvidableAmbient<AnimationClockObservable>

Deprecated.

The default animation clock used for animations when an explicit clock isn't provided.

AutofillAmbient

val AutofillAmbient: