ui/android
lib/ui/android.vklib/ui/android.vk
Pure-Veko Android / Jetpack Compose Material 3 declarative modifier & policy module (ui/android).
- Material You dynamic color & contrast theming (MaterialYouTheme, material-you, with-material-you)
- Edge-to-edge system bar scrims (EdgeToEdgeSpec, edge-to-edge, with-edge-to-edge)
- Predictive back policy (PredictiveBackPolicy, with-predictive-back) & Compose haptics (HapticSpec, with-haptic)
- Notification channel descriptors (NotificationChannelSpec, notification-channel, channel-to-map)
- Strict offline-safe Android WebView URL policy (validate-url-policy) & platform capability descriptor (capabilities)
- Zero top-level mut globals, zero ffi/net imports, and zero host capabilities required
MaterialYouTheme = struct { dynamic_color bool = ..., dark_theme bool = ..., contrast enum = ... }
Material 3 / Material You theming specification (contrast: .standard, .medium, .high).
EdgeToEdgeSpec = struct { status_scrim str = ..., nav_scrim str = ..., light_icons bool = ... }
Android edge-to-edge system bar scrim and icon luminance specification.
PredictiveBackPolicy = struct { enabled bool = ..., confirm_action any = ... }
Android 14+ predictive back gesture policy descriptor.
HapticSpec = struct { kind enum = ... }
Android HapticFeedbackConstants / Compose HapticFeedbackType descriptor.
NotificationChannelSpec = struct { id str, name str, importance enum = ..., description str = ... }
Android NotificationChannel specification (importance: .low, .default, .high, .max).
material-you = fn [dynamic_color bool, dark_theme bool, contrast enum] MaterialYouTheme
Builds a validated MaterialYouTheme (contrast: .standard, .medium, .high).
with-material-you = fn [nd v/Node, theme MaterialYouTheme] v/Node
Attaches android_material_you, android_dark_theme, and android_contrast to nd.props.
edge-to-edge = fn [status_scrim str, nav_scrim str, light_icons bool] EdgeToEdgeSpec
Builds an EdgeToEdgeSpec with normalized ARGB hex scrim defaults (#00000000).
with-edge-to-edge = fn [nd v/Node, spec EdgeToEdgeSpec] v/Node
Attaches android_edge_to_edge, android_status_scrim, android_nav_scrim, and android_light_icons to nd.props.
with-predictive-back = fn [nd v/Node, enabled bool, confirm_action any] v/Node
Attaches android_predictive_back and android_back_action to nd.props.
with-haptic = fn [nd v/Node, kind enum] v/Node
Attaches android_haptic feedback kind (.click, .long_press, .text_handle, .confirm, .reject) to nd.props.
notification-channel = fn [id str, name str, importance enum, description str] NotificationChannelSpec
Builds a validated NotificationChannelSpec (importance: .low, .default, .high, .max).
channel-to-map = fn [ch NotificationChannelSpec] map
Converts a NotificationChannelSpec to a plain serialization-ready map.
validate-url-policy = fn [url str, allow_net bool] map
Validates a navigation URI against Android WebView safety and .net capability policy.
capabilities = fn [] map
Returns static capability metadata for the Veko Android target.