Android 12 Developer Preview is here! Try it out, and give us your feedback!

androidx.compose.foundation.shape

Interfaces

CornerSize

Defines size of a corner in pixels.

Classes

AbsoluteCutCornerShape

A shape describing the rectangle with cut corners.

AbsoluteRoundedCornerShape

A shape describing the rectangle with rounded corners.

CornerBasedShape

Base class for Shapes defined by four CornerSizes.

CutCornerShape

A shape describing the rectangle with cut corners.

GenericShape

Creates Shape defined by applying the provided builder on a Path.

RoundedCornerShape

A shape describing the rectangle with rounded corners.

Top-level functions summary

AbsoluteCutCornerShape

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

AbsoluteCutCornerShape

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

AbsoluteCutCornerShape

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

AbsoluteCutCornerShape

Creates AbsoluteCutCornerShape with the same size applied for all four corners.

AbsoluteCutCornerShape
AbsoluteCutCornerShape(topLeft: Dp = 0.dp, topRight: Dp = 0.dp, bottomRight: Dp = 0.dp, bottomLeft: Dp = 0.dp)

Creates AbsoluteCutCornerShape with sizes defined in Dp.

AbsoluteCutCornerShape
AbsoluteCutCornerShape(topLeft: Float = 0.0f, topRight: Float = 0.0f, bottomRight: Float = 0.0f, bottomLeft: Float = 0.0f)

Creates AbsoluteCutCornerShape with sizes defined in float.

AbsoluteCutCornerShape
AbsoluteCutCornerShape(topLeftPercent: Int = 0, topRightPercent: Int = 0, bottomRightPercent: Int = 0, bottomLeftPercent: Int = 0)

Creates AbsoluteCutCornerShape with sizes defined in percents of the shape's smaller side.

AbsoluteRoundedCornerShape

Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.

AbsoluteRoundedCornerShape

Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.

AbsoluteRoundedCornerShape

Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.

AbsoluteRoundedCornerShape

Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.

AbsoluteRoundedCornerShape
AbsoluteRoundedCornerShape(topLeft: Dp = 0.dp, topRight: Dp = 0.dp, bottomRight: Dp = 0.dp, bottomLeft: Dp = 0.dp)

Creates AbsoluteRoundedCornerShape with sizes defined in Dp.

AbsoluteRoundedCornerShape
AbsoluteRoundedCornerShape(topLeft: Float = 0.0f, topRight: Float = 0.0f, bottomRight: Float = 0.0f, bottomLeft: Float = 0.0f)

Creates AbsoluteRoundedCornerShape with sizes defined in pixels.

AbsoluteRoundedCornerShape
AbsoluteRoundedCornerShape(topLeftPercent: Int = 0, topRightPercent: Int = 0, bottomRightPercent: Int = 0,