AbsoluteRoundedCornerShape

Function

Common
fun AbsoluteRoundedCornerShape(corner: CornerSize) =
    AbsoluteRoundedCornerShape(corner, corner, corner, corner)

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

Parameters

cornerCornerSize to apply.
Common
fun AbsoluteRoundedCornerShape(size: Dp) = AbsoluteRoundedCornerShape(CornerSize(size))

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

Parameters

sizeSize in Dp to apply.
Common
fun AbsoluteRoundedCornerShape(size: Float) = AbsoluteRoundedCornerShape(CornerSize(size))

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

Parameters

sizeSize in pixels to apply.
Common
fun AbsoluteRoundedCornerShape(percent: Int) = AbsoluteRoundedCornerShape(CornerSize(percent))

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

Parameters

percentSize in percents to apply.
Common
fun AbsoluteRoundedCornerShape(
    topLeft: Dp = 0.dp,
    topRight: Dp = 0.dp,
    bottomRight: Dp = 0.dp,
    bottomLeft: Dp = 0.dp,
) =
    AbsoluteRoundedCornerShape(
        topLeft = CornerSize(topLeft),
        topRight = CornerSize(topRight),
        bottomRight = CornerSize(bottomRight),
        bottomLeft = CornerSize(bottomLeft),
    )

Creates AbsoluteRoundedCornerShape with sizes defined in Dp.

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

Creates AbsoluteRoundedCornerShape with sizes defined in pixels.

Common
fun AbsoluteRoundedCornerShape(
    @IntRange(from = 0, to = 100) topLeftPercent: Int = 0,
    @IntRange(from = 0, to = 100) topRightPercent: Int = 0,
    @IntRange(from = 0, to = 100) bottomRightPercent: Int = 0,
    @IntRange(from = 0, to = 100) bottomLeftPercent: Int = 0,
) =
    AbsoluteRoundedCornerShape(
        topLeft = CornerSize(topLeftPercent),
        topRight = CornerSize(topRightPercent),
        bottomRight = CornerSize(bottomRightPercent),
        bottomLeft = CornerSize(bottomLeftPercent),
    )

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

Parameters

topLeftPercentThe top left corner radius as a percentage of the smaller side, with a range of 0 - 100.
topRightPercentThe top right corner radius as a percentage of the smaller side, with a range of 0 - 100.
bottomRightPercentThe bottom right corner radius as a percentage of the smaller side, with a range of 0 - 100.
bottomLeftPercentThe bottom left corner radius as a percentage of the smaller side, with a range of 0 - 100.