Shapes

object Shapes

Houses utilities for creating Shapes.

Properties

Link copied to clipboard

A shape whose each corner is fully rounded.

Link copied to clipboard

A rectangle with sharp corners.

Functions

Link copied to clipboard
fun cutCornerShape(allPercent: Int): CorneredShape
fun cutCornerShape(topLeftPercent: Int = 0, topRightPercent: Int = 0, bottomRightPercent: Int = 0, bottomLeftPercent: Int = 0): CorneredShape

Creates a Shape with all corners cut.

Link copied to clipboard
fun drawableShape(drawable: Drawable, tintDrawable: Boolean = true, keepAspectRatio: Boolean = false, otherShape: Shape? = rectShape): Shape

Creates a Shape out of a Drawable.

Link copied to clipboard
fun roundedCornerShape(topLeftPercent: Int = 0, topRightPercent: Int = 0, bottomRightPercent: Int = 0, bottomLeftPercent: Int = 0): CorneredShape

Creates a Shape with all corners rounded.