Actions
Scope: Any
|
Configure component to receive clicks via input or accessibility "click" event. |
Scope: Any
|
Modifier.clickable(
Configure component to receive clicks via input or accessibility "click" event. |
Scope: Any @ExperimentalFoundationApi |
Modifier.combinedClickable(
Configure component to receive clicks, double clicks and long clicks via input or accessibility "click" event. |
Scope: Any @ExperimentalFoundationApi |
Modifier.combinedClickable(
Configure component to receive clicks, double clicks and long clicks via input or accessibility "click" event. |
Scope: Any
|
Modifier.draggable(
Configure touch dragging for the UI element in a single |
Scope: Any
|
Configure component to be selectable, usually as a part of a mutually exclusive group, where only one item can be selected at any point in time. |
Scope: Any
|
Modifier.selectable(
Configure component to be selectable, usually as a part of a mutually exclusive group, where only one item can be selected at any point in time. |
Scope: Any
|
Use this modifier to group a list of |
Scope: Any @ExperimentalMaterialApi |
<T : Any?> Modifier.swipeable(
Enable swipe gestures between a set of predefined states. |
Scope: Any
|
Modifier.toggleable(
Configure component to make it toggleable via input and accessibility events |
Scope: Any
|
Modifier.toggleable(
Configure component to make it toggleable via input and accessibility events. |
Scope: Any
|
Modifier.triStateToggleable(
Configure component to make it toggleable via input and accessibility events with three states: On, Off and Indeterminate. |
Scope: Any
|
Modifier.triStateToggleable(
Configure component to make it toggleable via input and accessibility events with three states: On, Off and Indeterminate. |
Alignment
Scope:
BoxScope @Stable |
Pull the content element to a specific |
Scope:
RowScope @Stable |
Modifier.align(alignment: Alignment.Vertical)
Align the element vertically within the |
Scope:
RowScope @Stable |
Modifier.alignBy(alignmentLine: HorizontalAlignmentLine)
Position the element vertically such that its |
Scope:
RowScope @Stable |
Position the element vertically such that the alignment line for the content as determined by |
Scope:
RowScope @Stable |
Position the element vertically such that its first baseline aligns with sibling elements also configured to |
Scope:
ColumnScope @Stable |
Modifier.align(alignment: Alignment.Horizontal)
Align the element horizontally within the |
Scope:
ColumnScope @Stable |
Modifier.alignBy(alignmentLine: VerticalAlignmentLine)
Position the element horizontally such that its |
Scope:
ColumnScope @Stable |
Position the element horizontally such that the alignment line for the content as determined by |
Animation
Scope:
AnimatedVisibilityScope open |
Modifier.animateEnterExit(enter: EnterTransition, exit: ExitTransition)
|
Border
Scope: Any
|
Modifier.border(border: BorderStroke, shape: Shape)
Modify element to add border with appearance specified with a |
Scope: Any
|
Modify element to add border with appearance specified with a |
Scope: Any
|
Modify element to add border with appearance specified with a |
Drawing
Scope: Any @Stable |
Draw content with modified alpha that may be less than 1. |
Scope: Any
|
Modifier.background(color: Color, shape: Shape)
|
Scope: Any
|
Modifier.background(brush: Brush, shape: Shape, alpha: Float)
|
Scope: Any @Stable |
Clip the content to |
Scope: Any @Stable |
Clip the content to the bounds of a layer defined at this modifier. |
Scope: Any
|
Modifier.drawBehind(onDraw: DrawScope.() -> Unit)
Draw into a |
Scope: Any
|
Modifier.drawWithCache(
Draw into a |
Scope: Any
|
Modifier.drawWithContent(onDraw: ContentDrawScope.() -> Unit)
Creates a |
Scope: Any
|
Modifier.indication(
Draws visual effects for this component when interactions occur. |
Scope: Any
|
Modifier.paint(
Paint the content using |
Scope: Any @Stable |
Creates a GraphicsLayerModifier that draws the shadow. |
Scope: Any @Stable |
Creates a modifier that controls the drawing order for the children of the same layout parent. |
Focus
Scope: Any
|
This function is deprecated. Replaced by focusTarget |
Scope: Any
|
Modifier.focusOrder(focusOrderReceiver: FocusOrder.() -> Unit)
Use this modifier to specify a custom focus traversal order. |
Scope: Any
|
Modifier.focusOrder(focusRequester: FocusRequester)
A modifier that lets you specify a |
Scope: Any
|
Modifier.focusOrder(
A modifier that lets you specify a |
Scope: Any
|
Modifier.focusRequester(focusRequester: FocusRequester)
Add this modifier to a component to observe changes to focus state. |
Scope: Any
|
Add this modifier to a component to make it focusable. |
Scope: Any
|
Modifier.focusable(
Configure component to be focusable via focus system or accessibility "focus" event. |
Scope: Any
|
Modifier.onFocusChanged(onFocusChanged: (FocusState) -> Unit)
Add this modifier to a component to observe focus state events. |
Scope: Any
|
Modifier.onFocusEvent(onFocusEvent: (FocusState) -> Unit)
Add this modifier to a component to observe focus state events. |
Graphics
Scope: Any @Stable |
Modifier.graphicsLayer(
A |
Scope: Any @Stable |
Modifier.graphicsLayer(block: GraphicsLayerScope.() -> Unit)
A |
Scope: Any @Stable |
A |
Keyboard
Scope: Any
|
Modifier.onKeyEvent(onKeyEvent: (KeyEvent) -> Boolean)
Adding this |
Scope: Any
|
Modifier.onPreviewKeyEvent(onPreviewKeyEvent: (KeyEvent) -> Boolean)
Adding this |
Layout
Scope: Any
|
Modifier.layout(
Creates a |
Scope: Any @Stable |
Tag the element with |
Scope: Any @Stable |
Modifier.onGloballyPositioned(
Invoke |
Padding
Scope: Any @Stable |
Apply additional space along each edge of the content in |
Scope: Any @Stable |
Apply additional space along each edge of the content in |
Scope: Any @Stable |
Apply |
Scope: Any @Stable |
Apply |
Scope: Any @Stable |
Modifier.padding(paddingValues: PaddingValues)
Apply |
Scope: Any @Stable |
Modifier.paddingFrom(alignmentLine: AlignmentLine, before: Dp, after: Dp)
A |
Scope: Any @Stable |
Modifier.paddingFrom(
A |
Scope: Any @Stable |
Modifier.paddingFromBaseline(top: Dp, bottom: Dp)
A |
Scope: Any @Stable |
Modifier.paddingFromBaseline(top: TextUnit, bottom: TextUnit)
A |
Pointer
Scope: Any
|
Modifier.
This function is deprecated. Modifier.pointerInput must provide one or more 'key' parameters that define the identity of the modifier and determine when its previous input processing coroutine should be cancelled and a new effect launched for the new key. |
Scope: Any
|
Modifier.pointerInput(
Create a modifier for processing pointer input within the region of the modified element. |
Scope: Any
|
Modifier.pointerInput(
Create a modifier for processing pointer input within the region of the modified element. |
Scope: Any
|
Modifier.pointerInput(
Create a modifier for processing pointer input within the region of the modified element. |
Scope: Any @ExperimentalComposeUiApi |
Modifier.pointerInteropFilter(
A special PointerInputModifier that provides access to the underlying |
Position
Scope: Any @Stable |
Modifier.absoluteOffset(x: Dp, y: Dp)
|
Scope: Any
|
Modifier.absoluteOffset(offset: Density.() -> IntOffset)
Offset the content by |
Scope: Any @Stable |
|
Scope: Any
|
Offset the content by |
Scope:
TabRowDefaults
|
Modifier.tabIndicatorOffset(currentTabPosition: TabPosition)
|
Semantics
Scope: Any
|
Modifier.clearAndSetSemantics(
Clears the semantics of all the descendant nodes and sets new semantics. |
Scope: Any @Stable |
Modifier.progressSemantics(
Contains the |
Scope: Any @Stable |
Contains the |
Scope: Any
|
Modifier.semantics(
Add semantics key/value pairs to the layout node, for use in testing, accessibility, etc. |
Scroll
Scope: Any
|
Modifier.horizontalScroll(
Modify element to allow to scroll horizontally when width of the content is bigger than max constraints allow. |
Scope: Any
|
Modifier.nestedScroll(
Modify element to make it participate in the nested scrolling hierarchy. |
Scope: Any @ExperimentalComposeUiApi |
Modifier.relocationRequester(relocationRequester: RelocationRequester)
This is a modifier that can be used to send relocation requests. |
Scope: Any
|
Modifier.scrollable(
Configure touch scrolling and flinging for the UI element in a single |
Scope: Any
|
Modifier.verticalScroll(
Modify element to allow to scroll vertically when height of the content is bigger than max constraints allow. |
Size
Scope: Any
|
Modifier.animateContentSize(
This modifier animates its own size when its child modifier (or the child composable if it is already at the tail of the chain) changes size. |
Scope: Any @Stable |
Modifier.aspectRatio(ratio: Float, matchHeightConstraintsFirst: Boolean)
Attempts to size the content to match a specified aspect ratio by trying to match one of the incoming constraints in the following order: |
Scope: Any @Stable |
Modifier.defaultMinSize(minWidth: Dp, minHeight: Dp)
Constrain the size of the wrapped layout only when it would be otherwise unconstrained: the |
Scope: Any @Stable |
Modifier.fillMaxHeight(fraction: Float)
Have the content fill (possibly only partially) the |
Scope: Any @Stable |
Modifier.fillMaxSize(fraction: Float)
Have the content fill (possibly only partially) the |
Scope: Any @Stable |
Modifier.fillMaxWidth(fraction: Float)
Have the content fill (possibly only partially) the |
Scope: Any @Stable |
Modifier.height(intrinsicSize: IntrinsicSize)
Declare the preferred height of the content to be the same as the min or max intrinsic height of the content. |
Scope: Any @Stable |
Declare the preferred height of the content to be exactly |
Scope: Any @Stable |
Constrain the height of the content to be between |
Scope: Any @Stable |
Modifier.onSizeChanged(onSizeChanged: (IntSize) -> Unit)
Invoke |
Scope: Any @Stable |
Modifier.requiredHeight(intrinsicSize: IntrinsicSize)
Declare the height of the content to be exactly the same as the min or max intrinsic height of the content. |
Scope: Any @Stable |
Modifier.requiredHeight(height: Dp)
Declare the height of the content to be exactly |
Scope: Any @Stable |
Modifier.requiredHeightIn(min: Dp, max: Dp)
Constrain the height of the content to be between |
Scope: Any @Stable |
Modifier.requiredSize(size: Dp)
Declare the size of the content to be exactly |
Scope: Any @Stable |
Modifier.requiredSize(width: Dp, height: Dp)
Declare the size of the content to be exactly |
Scope: Any @Stable |
Constrain the width of the content to be between |
Scope: Any @Stable |
Modifier.requiredWidth(intrinsicSize: IntrinsicSize)
Declare the width of the content to be exactly the same as the min or max intrinsic width of the content. |
Scope: Any @Stable |
Modifier.requiredWidth(width: Dp)
Declare the width of the content to be exactly |
Scope: Any @Stable |
Modifier.requiredWidthIn(min: Dp, max: Dp)
Constrain the width of the content to be between |
Scope: Any @Stable |
Declare the preferred size of the content to be exactly |
Scope: Any @Stable |
Declare the preferred size of the content to be exactly |
Scope: Any @Stable |
Constrain the width of the content to be between |
Scope: Any @Stable |
Modifier.width(intrinsicSize: IntrinsicSize)
Declare the preferred width of the content to be the same as the min or max intrinsic width of the content. |
Scope: Any @Stable |
Declare the preferred width of the content to be exactly |
Scope: Any @Stable |
Constrain the width of the content to be between |
Scope: Any @Stable |
Modifier.wrapContentHeight(
Allow the content to measure at its desired height without regard for the incoming measurement |
Scope: Any @Stable |
Modifier.wrapContentSize(align: Alignment, unbounded: Boolean)
Allow the content to measure at its desired size without regard for the incoming measurement |
Scope: Any @Stable |
Modifier.wrapContentWidth(
Allow the content to measure at its desired width without regard for the incoming measurement |
Scope:
LazyItemScope
|
Modifier.fillParentMaxHeight(fraction: Float)
Have the content fill the |
Scope:
LazyItemScope
|
Modifier.fillParentMaxSize(fraction: Float)
Have the content fill the |
Scope:
LazyItemScope
|
Modifier.fillParentMaxWidth(fraction: Float)
Have the content fill the |
Scope:
BoxScope @Stable |
Size the element to match the size of the |
Scope:
RowScope @Stable |
Size the element's width proportional to its |
Scope:
ColumnScope @Stable |
Size the element's height proportional to its |
Testing
Scope: Any @Stable |
Applies a tag to allow modified element to be found in tests. |
Transformations
Scope: Any @Stable |
Sets the degrees the view is rotated around the center of the composable. |
Scope: Any @Stable |
Scale the contents of the composable by the following scale factors along the horizontal and vertical axis respectively. |
Scope: Any @Stable |
Scale the contents of both the horizontal and vertical axis uniformly by the same scale factor. |
Scope: Any
|
Modifier.transformable(
Enable transformation gestures of the modified UI element. |
Other
Scope: Any
|
Declare a just-in-time composition of a |
Scope: Any
|
Composer.materialize(modifier: Modifier)
Materialize any instance-specific |