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

androidx.compose.foundation

Interfaces

Indication

Generic interface to define visual effects when certain interaction happens.

IndicationInstance

Generic interface to define the instance if the Indication to draw visual effects when certain interaction happens.

Interaction

An Interaction represents transient UI state for a component, typically separate from the actual 'business' state that a component may control.

Classes

Border

Class to specify border appearance.

BorderStroke

Class to specify the stroke to draw border with.

InteractionState

InteractionState represents a Set of Interactions present on a given component.

MutatorMutex

Mutual exclusion for UI state mutation over time.

ScrollState

State of the scroll.

Type-aliases

ContentGravity

Annotations

ExperimentalFoundationApi

InternalFoundationApi

Enums

MutatePriority

Priorities for performing mutation on state.

Top-level functions summary

Unit
BaseTextField(value: TextFieldValue, onValueChange: (TextFieldValue) -> Unit, modifier: Modifier = Modifier, textColor: Color = Color.Unspecified, textStyle: TextStyle = AmbientTextStyle.current, keyboardType: KeyboardType = KeyboardType.Text, imeAction: ImeAction = ImeAction.Unspecified, onImeActionPerformed: (ImeAction) -> Unit = {}, visualTransformation: VisualTransformation = VisualTransformation.None, onTextLayout: (TextLayoutResult) -> Unit = {}, onTextInputStarted: (SoftwareKeyboardController) -> Unit = {}, cursorColor: Color = AmbientContentColor.current)

Composable that enables users to edit text via hardware or software keyboard.

Border
Border(size: Dp, color: Color)

Create Border class with size and Color

BorderStroke
BorderStroke(width: Dp, color: Color)

Create BorderStroke class with width and Color

Unit
Box(modifier: Modifier = Modifier, shape: Shape = RectangleShape, backgroundColor: Color = Color.Transparent, border: BorderStroke? = null, padding: Dp = border?.width ?: 0.dp, paddingStart: Dp = Dp.Unspecified, paddingTop: Dp = Dp.Unspecified, paddingEnd: Dp = Dp.Unspecified, paddingBottom: Dp = Dp.Unspecified, gravity: ContentGravity = ContentGravity.TopStart, children: () -> Unit = emptyContent())

Unit
Canvas(modifier: Modifier, onDraw: DrawScope.() -> Unit)

Component that allow you to specify an area on the screen and perform canvas drawing on this area.

Unit
ClickableText(text: AnnotatedString, modifier: Modifier = Modifier, style: TextStyle = TextStyle.Default, softWrap: Boolean = true, overflow: TextOverflow = TextOverflow.Clip, maxLines: Int = Int.MAX_VALUE, onTextLayout: (TextLayoutResult) -> Unit = {}, onClick: (Int) -> Unit)

A continent version of BasicText component to be able to handle click event on the text.

Unit
Icon(asset: VectorAsset, modifier: Modifier = Modifier, tint: Color = AmbientContentColor.current)

Icon component that draws asset using tint, defaulting to AmbientContentColor.

Unit
Icon(asset: ImageAsset, modifier: Modifier = Modifier, tint: Color = AmbientContentColor.current)

Icon component that draws asset using tint, defaulting to AmbientContentColor.

Unit
Icon(painter: Painter, modifier: Modifier = Modifier, tint: Color = AmbientContentColor.current)

Icon component that draws a painter using tint, defaulting to AmbientContentColor.

Unit
Image(asset: ImageAsset, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null)

A composable that lays out and draws a given ImageAsset.

Unit
Image(asset: VectorAsset, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null)

A composable that lays out and draws a given VectorAsset.

Unit
Image(painter: Painter, modifier: Modifier = Modifier, alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Fit, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null)

Creates a composable that lays out and draws a given Painter.

Unit
ProvideTextStyle(value: TextStyle, children: () -> Unit)

This function is used to set the current value of AmbientTextStyle, merging the given style with the current style values for any missing attributes.

Unit
ScrollableColumn(modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(0f), verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, reverseScrollDirection: Boolean = false, isScrollEnabled: Boolean = true, contentPadding: PaddingValues = PaddingValues(0.dp), children: ColumnScope.() -> Unit)

Variation of Column that scrolls when content is bigger than its height.

Unit
ScrollableRow(modifier: Modifier = Modifier, scrollState: ScrollState = rememberScrollState(0f), horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, verticalAlignment: Alignment.Vertical = Alignment.Top, reverseScrollDirection: Boolean = false, isScrollEnabled: Boolean = true, contentPadding: PaddingValues = PaddingValues(0.dp), children: RowScope.() -> Unit)

Variation of Row that scrolls when content is bigger than its width.

Unit
Text(text: String, modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Inherit, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Inherit, textDecoration: TextDecoration? = null, textAlign: TextAlign? = null, lineHeight: TextUnit = TextUnit.Inherit, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, onTextLayout: (TextLayoutResult) -> Unit = {}, style: TextStyle = AmbientTextStyle.current)

High level element that displays text and provides semantics / accessibility information.

Unit
Text(text: AnnotatedString, modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Inherit, fontStyle: FontStyle? = null, fontWeight: