Package-level declarations

Core API for RadialMenu including composables, View implementation, math utilities, and configuration classes.

Types

Link copied to clipboard
data class RadialMenuAnimationConfig(val openDurationMs: Int = 300, val closeDurationMs: Int = 200, val itemScaleDurationMs: Int = 100, val easing: Easing = FastOutSlowInEasing, val selectedItemScale: Float = 1.4f, val enableSpringAnimation: Boolean = false, val springDampingRatio: Float = Spring.DampingRatioMediumBouncy, val springStiffness: Float = Spring.StiffnessMedium)

Controls animation behavior of the RadialMenu.

Link copied to clipboard
data class RadialMenuColors(val itemBackground: Color, val itemBackgroundSelected: Color, val iconTint: Color, val iconTintSelected: Color, val overlayColor: Color, val centerIndicatorColor: Color, val badgeColor: Color, val badgeTextColor: Color)

Configuration for colors used in the radial menu.

Link copied to clipboard

Default constants and dimensions used in the radial menu components.

Link copied to clipboard
data class RadialMenuItem(val id: Int, val icon: Painter, val iconActive: Painter? = null, val label: String = "", val isActive: Boolean = false, val badgeCount: Int = 0, val badgeText: String? = null, val contentDescription: String = label)

Represents a single item in the radial menu.

Link copied to clipboard

Core mathematical functions for RadialMenu positioning and selection.

Link copied to clipboard
class RadialMenuView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View

A custom, drag-to-select radial menu Android View component.

Functions

Link copied to clipboard
fun Painter.drawWithCache(canvas: Canvas, bounds: Rect, colorFilter: ColorFilter?, drawScope: CanvasDrawScope, composeCanvas: Canvas, baseSize: Size, scale: Float)

Scoped draw method for Compose Painters onto a native Android Canvas. Passed arguments avoid per-frame allocations.

Link copied to clipboard
fun RadialMenuCanvas(center: Offset, dragOffset: Offset, selectionIndex: Int?, items: List<RadialMenuItem>, colors: RadialMenuColors, centerAngle: Float, animationConfig: RadialMenuAnimationConfig, edgeHugPositions: List<Offset>? = null)

The internal drawing logic for the radial menu icons, indicators, and badges.

Link copied to clipboard
fun RadialMenuOverlay(items: List<RadialMenuItem>, colors: RadialMenuColors = RadialMenuColors.default(), animationConfig: RadialMenuAnimationConfig = RadialMenuAnimationConfig.default())

The fullscreen overlay that displays the radial menu when active. Uses a Popup to render above all other UI elements (toolbars, FABs, etc.).

Link copied to clipboard
fun RadialMenuWrapper(items: List<RadialMenuItem>, onItemSelected: (RadialMenuItem) -> Unit, enableEdgeHugLayout: Boolean = false, onTap: () -> Unit = {}, onDoubleTap: () -> Unit = {}, modifier: Modifier = Modifier, content: @Composable () -> Unit)

A wrapper composable that detects long presses and shows the radial menu overlay.

Link copied to clipboard

Extension to convert an Android Drawable into a Jetpack Compose Painter.