Skip to content

Instantly share code, notes, and snippets.

@SylpheM
SylpheM / TooltipShape.kt
Last active March 30, 2024 06:15
A tooltip shape (a rounded rectangle with an arrow or a tick), that can be used with a shadow. Preview included
enum class TickOrientation {
TOP, START, END, BOTTOM
}
class TooltipShape(
private val cornerRadiusDp: Dp,
private val tickHeight: Dp,
private val tickOrientation: TickOrientation
) : Shape {