CurvedLayout
Composable Function
Android
@Composable
public fun CurvedLayout(
modifier: Modifier = Modifier,
anchor: Float = 270f,
anchorType: AnchorType = AnchorType.Center,
radialAlignment: CurvedAlignment.Radial? = null,
angularDirection: CurvedDirection.Angular = CurvedDirection.Angular.Normal,
contentBuilder: CurvedScope.() -> Unit,
)
A layout composable that places its children in an arc, rotating them as needed. This will layout
children using a curvedRow
, that similar to a Row
layout, that it's curved into a segment of
an annulus.
Parameters
modifier | The modifier to be applied to the CurvedRow. |
anchor | The angle at which children are laid out relative to, in degrees. An angle of 0 corresponds to the right (3 o'clock on a watch), 90 degrees is bottom (6 o'clock), and so on. Default is 270 degrees (top of the screen) |
anchorType | Specify how the content is drawn with respect to the anchor. Default is to center the content on the anchor. |
radialAlignment | Specifies the radial alignment for children, if not specified, children can choose their own radial Alignment. Alignment specifies where to lay down children that are thiner than the CurvedRow, either closer to the center (INNER), apart from the center (OUTER) or in the middle point (CENTER). |
angularDirection | Specify the direction the children are laid on. See CurvedDirection.Angular . The default is CurvedDirection.Angular.Normal , which is clockwise under a LtR layout and counter clockwise on a RtL layout. |
contentBuilder | Specifies the content of this layout, currently there are 5 available elements defined in foundations for this DSL: the sub-layouts curvedBox , curvedRow and curvedColumn , basicCurvedText and curvedComposable (used to add normal composables to curved layouts) |