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

RoundedCornerShape

class RoundedCornerShape : CornerBasedShape
kotlin.Any
   ↳ androidx.compose.foundation.shape.CornerBasedShape
   ↳ androidx.compose.foundation.shape.RoundedCornerShape

A shape describing the rectangle with rounded corners.

This shape will automatically mirror the corner sizes in LayoutDirection.Rtl, use AbsoluteRoundedCornerShape for the layout direction unaware version of this shape.

Summary

Public constructors
<init>(topStart: CornerSize, topEnd: CornerSize, bottomEnd: CornerSize, bottomStart: CornerSize)

A shape describing the rectangle with rounded corners.

Public methods
RoundedCornerShape
copy(topStart: CornerSize, topEnd: CornerSize, bottomEnd: CornerSize, bottomStart: CornerSize)

Creates a copy of this Shape with a new corner sizes.

Outline
createOutline(size: Size, topStart: Float, topEnd: Float, bottomEnd: Float, bottomStart: Float, layoutDirection: LayoutDirection)

Creates Outline of this shape for the given size.

Boolean
equals(other: Any?)

Int

String

Inherited functions
Inherited properties

Public constructors

<init>

RoundedCornerShape(
    topStart: CornerSize,
    topEnd: CornerSize,
    bottomEnd: CornerSize,
    bottomStart: CornerSize)

A shape describing the rectangle with rounded corners.

This shape will automatically mirror the corner sizes in LayoutDirection.Rtl, use AbsoluteRoundedCornerShape for the layout direction unaware version of this shape.

Parameters
topStart: CornerSize a size of the top start corner
topEnd: CornerSize a size of the top end corner
bottomEnd: CornerSize a size of the bottom end corner
bottomStart