Google is committed to advancing racial equity for Black communities. See how.

FocusRequesterModifier

interface FocusRequesterModifier : Modifier.Element
androidx.compose.ui.FocusRequesterModifier

A modifier that can be used to pass in a FocusRequester that can be used to request focus state changes.

Summary

Inherited functions
Inherited extension functions
From androidx.compose.foundation.layout
Modifier
Modifier.absoluteOffset(x: Dp = 0.dp, y: Dp = 0.dp)

Offset the content by (x dp, y dp).

Modifier
Modifier.absoluteOffsetPx(x: State<Float> = mutableStateOf(0f), y: State<Float> = mutableStateOf(0f))

Offset the content by (x px, y px).

Modifier
Modifier.absolutePadding(left: Dp = 0.dp, top: Dp = 0.dp, right: Dp = 0.dp, bottom: Dp = 0.dp)

Apply additional space along each edge of the content in Dp: left, top, right and bottom.

Modifier
Modifier.aspectRatio(@FloatRange(0.0, 3.4E38, false) ratio: Float, matchHeightConstraintsFirst: Boolean = false)

Attempts to size the content to match a specified aspect ratio by trying to match one of the incoming constraints in the following order: Constraints.maxWidth, Constraints.maxHeight, Constraints.minWidth, Constraints.minHeight if matchHeightConstraintsFirst is false (which is the default), or Constraints.maxHeight, Constraints.maxWidth, Constraints.minHeight, Constraints.minWidth if matchHeightConstraintsFirst is true.

Modifier
Modifier.defaultMinSizeConstraints(minWidth: Dp = Dp.Unspecified, minHeight: Dp = Dp.Unspecified)

Constrain the size of the wrapped layout only when it would be otherwise unconstrained: the minWidth and minHeight constraints are only applied when the incoming corresponding constraint is 0.

Modifier
Modifier.fillMaxHeight(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill (possibly only partially) the Constraints.maxHeight of the incoming measurement constraints, by setting the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Modifier
Modifier.fillMaxSize(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill (possibly only partially) the Constraints.maxWidth and Constraints.maxHeight of the incoming measurement constraints, by setting the minimum width and the maximum width to be equal to the maximum width multiplied by fraction, as well as the minimum height and the maximum height to be equal to the maximum height multiplied by fraction.

Modifier
Modifier.fillMaxWidth(@FloatRange(0.0, 1.0) fraction: Float = 1f)

Have the content fill (possibly only partially) the Constraints.maxWidth of the incoming measurement constraints, by setting the minimum width and the maximum width to be equal to the maximum width multiplied by fraction.

Modifier
Modifier.height(height: Dp)

Declare the height of the content to be exactly heightdp.

Modifier
Modifier.heightIn(min: Dp = Dp.Unspecified, max: Dp = Dp.Unspecified)

Constrain the height of the content to be between mindp and maxdp.

Modifier
Modifier.offset(x: Dp = 0.dp, y: Dp = 0.dp)

Offset the content by (x dp, y dp).

Modifier
Modifier.offsetPx(x: State<Float> = mutableStateOf(0f), y: State<Float> = mutableStateOf(0f))

Offset the content by (x px, y px).

Modifier
Modifier.padding(start: Dp = 0.dp, top: Dp = 0.dp, end: Dp = 0.dp, bottom: Dp = 0.dp)

Apply additional space along each edge of the content in Dp: start, top, end and bottom.

Modifier
Modifier.padding(horizontal: Dp = 0.dp, vertical: Dp = 0.dp)

Apply horizontal dp space along the left and right edges of the content, and vertical dp space along the top and bottom edges.

Modifier

Apply all dp of additional space along each edge of the content, left, top, right and bottom.

Modifier

Apply PaddingValues to the component as additional space along each edge of the content's left, top, right and bottom.

Modifier
Modifier.paddingFrom(alignmentLine: AlignmentLine, before: Dp = Dp.Unspecified, after: Dp = Dp.Unspecified)

A Modifier that can add padding to position the content according to specified distances from its bounds to an alignment line.

Modifier
Modifier.paddingFrom(alignmentLine: AlignmentLine, before: TextUnit = TextUnit.Inherit, after: TextUnit = TextUnit.Inherit)

A Modifier that can add padding to position the content according to specified distances from its bounds to an alignment line.

Modifier
Modifier.paddingFromBaseline(top: Dp = Dp.Unspecified, bottom: Dp = Dp.Unspecified)

A Modifier that positions the content in a layout such that the distance from the top of the layout to the baseline of the first line of text in the content is top, and the distance from the baseline of the last line of text in the content to the bottom of the layout is bottom.

Modifier
Modifier.paddingFromBaseline(top: TextUnit = TextUnit.Inherit, bottom: TextUnit = TextUnit.Inherit)

A Modifier that positions the content in a layout such that the distance from the top of the layout to the baseline of the first line of text in the content is top, and the distance from the baseline of the last line of text in the content to the bottom of the layout is bottom.

Modifier

Declare the preferred height of the content to be the same as the min or max intrinsic height of the content.

Modifier

Declare the preferred height of the content to be exactly heightdp.

Modifier
Modifier.preferredHeightIn(min: Dp = Dp.Unspecified, max: Dp = Dp.Unspecified)

Constrain the height of the content to be between mindp and maxdp as permitted by the incoming measurement Constraints.

Modifier

Declare the preferred size of the content to be exactly sizedp square.

Modifier
Modifier.preferredSize(width: Dp, height: Dp)

Declare the preferred size of the content to be exactly widthdp by heightdp.

Modifier
Modifier.preferredSizeIn(minWidth: Dp = Dp.Unspecified, minHeight: Dp = Dp.Unspecified, maxWidth: Dp = Dp.Unspecified, maxHeight: Dp = Dp.Unspecified)

Constrain the width of the content to be between minWidthdp and maxWidthdp and the height of the content to be between minHeight and maxHeight as permitted by the incoming measurement Constraints.

Modifier

Declare the preferred width of the content to be the same as the min or max intrinsic width of the content.

Modifier

Declare the preferred width of the content to be exactly widthdp.

Modifier
Modifier.preferredWidthIn(min: Dp = Dp.Unspecified, max: Dp = Dp.Unspecified)

Constrain the width of the content to be between mindp and maxdp as permitted by the incoming measurement Constraints.

Modifier
Modifier.relativePaddingFrom(alignmentLine: AlignmentLine, before: Dp = Dp.Unspecified, after: Dp = Dp.Unspecified)

Modifier
Modifier.size(size: Dp)

Declare the size of the content to be exactly sizedp width and height.

Modifier
Modifier.size(width: Dp, height: Dp)

Declare the size of the content to be exactly widthdp and heightdp.

Modifier
Modifier.sizeIn(minWidth: Dp = Dp.Unspecified, minHeight: Dp = Dp.Unspecified, maxWidth: Dp = Dp.Unspecified, maxHeight: Dp = Dp.Unspecified)

Constrain the width of the content to be between minWidthdp and maxWidthdp, and the height of the content to be between minHeightdp and maxHeightdp.

Modifier
Modifier.width(width: Dp)

Declare the width of the content to be exactly widthdp.

Modifier
Modifier.widthIn(min: Dp = Dp.Unspecified, max: Dp = Dp.Unspecified)

Constrain the width of the content to be between mindp and maxdp.

Modifier
Modifier.wrapContentHeight(align: Alignment.Vertical = Alignment.CenterVertically, unbounded: Boolean = false)

Allow the content to measure at its desired height without regard for the incoming measurement minimum height constraint, and, if unbounded is true, also without regard for the incoming measurement maximum height constraint.

Modifier
Modifier.wrapContentSize(align: Alignment = Alignment.Center, unbounded: Boolean = false)

Allow the content to measure at its desired size without regard for the incoming measurement minimum width or minimum height constraints, and, if unbounded is true, also without regard for the incoming maximum constraints.

Modifier