androidx.compose.foundation.shape
Interfaces
CornerSize |
Defines size of a corner in pixels. |
Cmn
|
Classes
AbsoluteCutCornerShape |
A shape describing the rectangle with cut corners. |
Cmn
|
AbsoluteRoundedCornerShape |
A shape describing the rectangle with rounded corners. |
Cmn
|
CornerBasedShape |
Base class for |
Cmn
|
CutCornerShape |
A shape describing the rectangle with cut corners. |
Cmn
|
GenericShape |
Creates |
Cmn
|
RoundedCornerShape |
A shape describing the rectangle with rounded corners. |
Cmn
|
Top-level functions summary
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(corner: CornerSize)Creates |
Cmn
|
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(percent: Int)Creates |
Cmn
|
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(size: Dp)Creates |
Cmn
|
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(size: Float)Creates |
Cmn
|
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(Creates |
Cmn
|
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(Creates |
Cmn
|
AbsoluteCutCornerShape |
AbsoluteCutCornerShape(Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(corner: CornerSize)Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(percent: Int)Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(size: Dp)Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(size: Float)Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(Creates |
Cmn
|
AbsoluteRoundedCornerShape |
AbsoluteRoundedCornerShape(Creates |
Cmn
|
CornerSize |
CornerSize(percent: @IntRange(from = 0, to = 100) Int)Creates |
Cmn
|
CornerSize |
CornerSize(size: Dp)Creates |
Cmn
|
CornerSize |
CornerSize(size: Float)Creates |
Cmn
|
CutCornerShape |
CutCornerShape(corner: CornerSize)Creates |
Cmn
|
CutCornerShape |
CutCornerShape(percent: Int)Creates |
Cmn
|
CutCornerShape |
CutCornerShape(size: Dp)Creates |
Cmn
|
CutCornerShape |
CutCornerShape(size: Float)Creates |
Cmn
|
CutCornerShape |
CutCornerShape(topStart: Dp, topEnd: Dp, bottomEnd: Dp, bottomStart: Dp)Creates |
Cmn
|
CutCornerShape |
CutCornerShape(Creates |
Cmn
|
CutCornerShape |
CutCornerShape(Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(corner: CornerSize)Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(percent: Int)Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(size: Dp)Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(size: Float)Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(topStart: Dp, topEnd: Dp, bottomEnd: Dp, bottomStart: Dp)Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(Creates |
Cmn
|
RoundedCornerShape |
RoundedCornerShape(Creates |
Cmn
|
Top-level properties summary
RoundedCornerShape |
Circular |
Cmn
|
CornerSize |
|
Cmn
|
Top-level functions
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(corner: CornerSize): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
corner: CornerSize |
|
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(percent: Int): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
percent: Int |
Size in percents to apply. |
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(size: Dp): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with the same size applied for all four corners.
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(size: Float): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
size: Float |
Size in pixels to apply. |
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(
topLeft: Dp = 0.dp,
topRight: Dp = 0.dp,
bottomRight: Dp = 0.dp,
bottomLeft: Dp = 0.dp
): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with sizes defined in Dp.
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(
topLeft: Float = 0.0f,
topRight: Float = 0.0f,
bottomRight: Float = 0.0f,
bottomLeft: Float = 0.0f
): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with sizes defined in float.
AbsoluteCutCornerShape
fun AbsoluteCutCornerShape(
topLeftPercent: @IntRange(from = 0, to = 100) Int = 0,
topRightPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomRightPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomLeftPercent: @IntRange(from = 0, to = 100) Int = 0
): AbsoluteCutCornerShape
Creates AbsoluteCutCornerShape with sizes defined in percents of the shape's smaller side.
| Parameters | |
|---|---|
topLeftPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top left corner clip size as a percentage of the smaller side, with a range of 0 - 100. |
topRightPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top right corner clip size as a percentage of the smaller side, with a range of 0 - 100. |
bottomRightPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom right clip size radius as a percentage of the smaller side, with a range of 0 - 100. |
bottomLeftPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom left clip size radius as a percentage of the smaller side, with a range of 0 - 100. |
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(corner: CornerSize): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
corner: CornerSize |
|
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(percent: Int): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
percent: Int |
Size in percents to apply. |
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(size: Dp): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(size: Float): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
size: Float |
Size in pixels to apply. |
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(
topLeft: Dp = 0.dp,
topRight: Dp = 0.dp,
bottomRight: Dp = 0.dp,
bottomLeft: Dp = 0.dp
): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with sizes defined in Dp.
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(
topLeft: Float = 0.0f,
topRight: Float = 0.0f,
bottomRight: Float = 0.0f,
bottomLeft: Float = 0.0f
): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with sizes defined in pixels.
AbsoluteRoundedCornerShape
fun AbsoluteRoundedCornerShape(
topLeftPercent: @IntRange(from = 0, to = 100) Int = 0,
topRightPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomRightPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomLeftPercent: @IntRange(from = 0, to = 100) Int = 0
): AbsoluteRoundedCornerShape
Creates AbsoluteRoundedCornerShape with sizes defined in percents of the shape's smaller side.
| Parameters | |
|---|---|
topLeftPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top left corner radius as a percentage of the smaller side, with a range of 0 - 100. |
topRightPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top right corner radius as a percentage of the smaller side, with a range of 0 - 100. |
bottomRightPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom right corner radius as a percentage of the smaller side, with a range of 0 - 100. |
bottomLeftPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom left corner radius as a percentage of the smaller side, with a range of 0 - 100. |
CornerSize
fun CornerSize(percent: @IntRange(from = 0, to = 100) Int): CornerSize
Creates CornerSize with provided size.
CornerSize
fun CornerSize(size: Float): CornerSize
Creates CornerSize with provided size.
| Parameters | |
|---|---|
size: Float |
the corner size defined in pixels. |
CutCornerShape
fun CutCornerShape(corner: CornerSize): CutCornerShape
Creates CutCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
corner: CornerSize |
|
CutCornerShape
fun CutCornerShape(percent: Int): CutCornerShape
Creates CutCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
percent: Int |
Size in percents to apply. |
CutCornerShape
fun CutCornerShape(size: Dp): CutCornerShape
Creates CutCornerShape with the same size applied for all four corners.
CutCornerShape
fun CutCornerShape(size: Float): CutCornerShape
Creates CutCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
size: Float |
Size in pixels to apply. |
CutCornerShape
fun CutCornerShape(
topStart: Dp = 0.dp,
topEnd: Dp = 0.dp,
bottomEnd: Dp = 0.dp,
bottomStart: Dp = 0.dp
): CutCornerShape
Creates CutCornerShape with sizes defined in Dp.
CutCornerShape
fun CutCornerShape(
topStart: Float = 0.0f,
topEnd: Float = 0.0f,
bottomEnd: Float = 0.0f,
bottomStart: Float = 0.0f
): CutCornerShape
Creates CutCornerShape with sizes defined in float.
CutCornerShape
fun CutCornerShape(
topStartPercent: @IntRange(from = 0, to = 100) Int = 0,
topEndPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomEndPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomStartPercent: @IntRange(from = 0, to = 100) Int = 0
): CutCornerShape
Creates CutCornerShape with sizes defined in percents of the shape's smaller side.
| Parameters | |
|---|---|
topStartPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top start corner clip size as a percentage of the smaller side, with a range of 0 - 100. |
topEndPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top end corner clip size as a percentage of the smaller side, with a range of 0 - 100. |
bottomEndPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom end clip size radius as a percentage of the smaller side, with a range of 0 - 100. |
bottomStartPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom start clip size radius as a percentage of the smaller side, with a range of 0 - 100. |
RoundedCornerShape
fun RoundedCornerShape(corner: CornerSize): RoundedCornerShape
Creates RoundedCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
corner: CornerSize |
|
RoundedCornerShape
fun RoundedCornerShape(percent: Int): RoundedCornerShape
Creates RoundedCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
percent: Int |
Size in percents to apply. |
RoundedCornerShape
fun RoundedCornerShape(size: Dp): RoundedCornerShape
Creates RoundedCornerShape with the same size applied for all four corners.
RoundedCornerShape
fun RoundedCornerShape(size: Float): RoundedCornerShape
Creates RoundedCornerShape with the same size applied for all four corners.
| Parameters | |
|---|---|
size: Float |
Size in pixels to apply. |
RoundedCornerShape
fun RoundedCornerShape(
topStart: Dp = 0.dp,
topEnd: Dp = 0.dp,
bottomEnd: Dp = 0.dp,
bottomStart: Dp = 0.dp
): RoundedCornerShape
Creates RoundedCornerShape with sizes defined in Dp.
RoundedCornerShape
fun RoundedCornerShape(
topStart: Float = 0.0f,
topEnd: Float = 0.0f,
bottomEnd: Float = 0.0f,
bottomStart: Float = 0.0f
): RoundedCornerShape
Creates RoundedCornerShape with sizes defined in pixels.
RoundedCornerShape
fun RoundedCornerShape(
topStartPercent: @IntRange(from = 0, to = 100) Int = 0,
topEndPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomEndPercent: @IntRange(from = 0, to = 100) Int = 0,
bottomStartPercent: @IntRange(from = 0, to = 100) Int = 0
): RoundedCornerShape
Creates RoundedCornerShape with sizes defined in percents of the shape's smaller side.
| Parameters | |
|---|---|
topStartPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top start corner radius as a percentage of the smaller side, with a range of 0 - 100. |
topEndPercent: @IntRange(from = 0, to = 100) Int = 0 |
The top end corner radius as a percentage of the smaller side, with a range of 0 - 100. |
bottomEndPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom end corner radius as a percentage of the smaller side, with a range of 0 - 100. |
bottomStartPercent: @IntRange(from = 0, to = 100) Int = 0 |
The bottom start corner radius as a percentage of the smaller side, with a range of 0 - 100. |
Top-level properties
CircleShape
val CircleShape: RoundedCornerShape
Circular Shape with all the corners sized as the 50 percent of the shape size.