Package-level declarations

Types

Link copied to clipboard

Offset expressed as a fraction of the size of the widget.

Properties

Link copied to clipboard

Inverts the X and Y coordinates of a given offset

Link copied to clipboard

Inverts the X coordinate of a given offset

Link copied to clipboard

Inverts the Y coordinate of a given offset

Link copied to clipboard

Scale the element uniformly. Alias for GraphicsLayerScope.scaleX and GraphicsLayerScope.scaleY. Getter returns the average value of the scale

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A vector converter that converts this TextUnit value to a Float to allow you to animate it.

A vector converter that converts this Long value to a Float to allow you to animate it.

Functions

Link copied to clipboard

Produces an annotated string identical to the original string For those times when an api requires AnnotatedString but you don't want to build one

Annotates this string with the spanStyle provided. The whole string is annotated.

Annotates this string using the builder provided. The string is the argument of the lambda.

Link copied to clipboard

Converts fractional offset to absolute offset

Link copied to clipboard

Converts absolute offset to fractional offset

Link copied to clipboard
fun Modifier.autofill(autofillType: AutofillType, vararg autofillTypes: AutofillType, onFill: (String) -> Unit): Modifier

Mark this element as autofillable.

Link copied to clipboard

Sets the background color to this string

Link copied to clipboard

Applies FontWeight.Bold to this string

Link copied to clipboard

Scrolls to this widget when an element is focused (i.e. user taps the input field). Use on text input fields to keep them visible while editing.

Link copied to clipboard
fun String.clickable(onClick: () -> Unit): AnnotatedString

Makes this string clickable. When clicked, the onClick lambda is invoked

Link copied to clipboard

Sets the foreground color of this string

Link copied to clipboard
fun String.decorate(vararg decorations: TextDecoration): AnnotatedString

Adds text decorations provided to this string

Link copied to clipboard
Link copied to clipboard
@RequiresPermission(value = "android.permission.HIDE_OVERLAY_WINDOWS")
fun DisallowOverlays()

Disables overlays over the content of current activity for as long as this composable is in the composition Works only on API 31 (S) and above, otherwise does nothing.

Link copied to clipboard

Traverses the context hierarchy until an activity is found, or null if not present.

Link copied to clipboard

Changes the fontFamily of this string

Link copied to clipboard

Applies FontStyle.Italic to this string

Link copied to clipboard
actual fun KeepScreenOn(enabled: Boolean)

Keeps the screen of the current activity on while this composable is in composition.

expect fun KeepScreenOn(enabled: Boolean = true)

Keeps the device screen on while the current composable is in the composition.

actual fun KeepScreenOn(enabled: Boolean)

Keeps the device screen on while the current composable is in the composition.

actual fun KeepScreenOn(enabled: Boolean)

Keeps the device screen on while the current composable is in the composition.

actual fun KeepScreenOn(enabled: Boolean)

Keeps the device screen on while the current composable is in the composition.

actual fun KeepScreenOn(enabled: Boolean)

Keeps the device screen on while the current composable is in the composition.

Link copied to clipboard

Possible values for orientation:

Link copied to clipboard

Plays a medium haptic feedback, similar to force-touch or long-tap effect.

Link copied to clipboard

Registers a new lifecycle observer for the lifetime of the composition of this function, then clears it.

Link copied to clipboard
Link copied to clipboard

Remembers a reference to a Service's Binder in composition. The function will bind to a service while it is in the composition and unbind when it has left the composition. The function will maintain a ServiceConnection and return a State with a nullable value of service.

Link copied to clipboard
fun <T> rememberRetainedValue(key: String? = null, viewModelStoreOwner: ViewModelStoreOwner = checkNotNull(LocalViewModelStoreOwner.current) { "No ViewModelStoreOwner was provided via LocalViewModelStoreOwner" }, onDispose: T.() -> Unit? = null, calculation: () -> T): T

Remember the value produced by calculation. It behaves similarly to rememberSaveable, but uses ViewModel to store the value.

Link copied to clipboard

Sets flags to the parent activity, if exists, temporarily, until the composition is left. The flags are added and then removed, other flags are not changed Possible values of flags are from WindowManager.LayoutParams

Link copied to clipboard
fun String.shadow(color: Color, offset: Offset = Offset.Zero, blurRadius: Float = 0.0f): AnnotatedString

Adds a shadow to this string. The shadow has a color, an offset and a blurRadius

Link copied to clipboard

A shortcut for sending messages to any social media app installed in the user's device. This will optionally return an activity result as it's why an extension for ManagedActivityResultLauncher.

Link copied to clipboard

Plays a short haptic feedback, similar to a software keyboard typing vibration.

Link copied to clipboard

Applies absolute size to the text

Link copied to clipboard

Returns an enter transition that slides the element from the bottom fully

Link copied to clipboard

Returns an enter transition that slides the element from the left fully

Link copied to clipboard

Returns an enter transition that slides the element from the right fully

Link copied to clipboard

Returns an enter transition that slides the element from the top fully

Link copied to clipboard
fun slideInHorizontally(widthOffsetFraction: Float, spec: FiniteAnimationSpec<IntOffset> = DefaultSpec): EnterTransition

A positive value means sliding from right to left, whereas a negative value would slide the content from left to right.

Link copied to clipboard
fun slideInVertically(itemHeightOffsetFraction: Float, spec: FiniteAnimationSpec<IntOffset> = DefaultSpec): EnterTransition

Positive itemHeightOffsetFraction means the item is moving up.

Link copied to clipboard
fun slideOutHorizontally(widthOffsetFraction: Float, spec: FiniteAnimationSpec<IntOffset> = DefaultSpec): ExitTransition

A positive value means sliding to the right, whereas a negative value would slide the content towards the left.

Link copied to clipboard
fun slideOutVertically(itemHeightOffsetFraction: Float, spec: FiniteAnimationSpec<IntOffset> = DefaultSpec): ExitTransition

Positive itemHeightOffsetFraction means the item is moving down.

Link copied to clipboard

Returns an exit transition that slides the element to the bottom fully

Link copied to clipboard

Returns an exit transition that slides the element to the left fully

Link copied to clipboard

Returns an exit transition that slides the element to the right fully

Link copied to clipboard

Returns an exit transition that slides the element to the top fully

Link copied to clipboard

Strikes through this string

Link copied to clipboard

Applies a style to this string

Link copied to clipboard
inline fun <T : Any> TypeCrossfade(state: T, modifier: Modifier = Modifier, fill: Boolean = true, alignment: Alignment = Alignment.Center, animationSpec: FiniteAnimationSpec<Float> = tween(), crossinline content: @Composable T.() -> Unit)

TypeCrossfade is a Crossfade variation that runs a fade-through animation when the type of the state changes. It will not run the animation when the object itself changes.

Link copied to clipboard

Adds an underline to this string

Link copied to clipboard

Sets the font weight for this string