Skip to content

Instantly share code, notes, and snippets.

@SylpheM
SylpheM / TooltipShape.kt
Last active August 27, 2024 20:08
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 {