android-custom-drawing-canvas
Use when creating custom UI components, charts, shaders, or hardware-accelerated drawing in Android with Jetpack Compose Canvas.
Skill by prasad-vennam
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/prasad-vennam-android-custom-drawing-canvas
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/android-custom-drawing-canvas
What's inside
- Skill name
android-custom-drawing-canvas- Description
- Use when creating custom UI components, charts, shaders, or hardware-accelerated drawing in Android with Jetpack Compose Canvas.
- License
- MIT
- Instructions
- 75 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Android Custom Drawing & Canvas ✏️🎨
Advanced strategies for high-performance, pixel-level custom UI components, data visualization, and creative graphics in Jetpack Compose.
## ⚡ When to Use
- **Custom Charts**: Drawing pie, bar, or line charts with precise control.
- **Complex UI Elements**: Building circular progress bars or custom sliders.
- **Graphic Effects**: Applying shaders (AGSL), gradients, or masks.
- **Dynamic Graphics**: Hand-drawn signatures or interactive shapes.
- **Particle Systems**: Drawing lightweight, dynamic visual effects.
## 🏗️ Drawing with `Canvas`
- **Rule**: Use `Modifier.drawBehind { ... }` or `Canvas(modifier = ...) { ... }`.
- **Coordinate System**: (0,0) is TOP-LEFT.
- **Draw Scope**: Access built-in methods like `drawRect`, `drawCircle`, `drawPath`.
### 1. Drawing a Circular Progress Bar
```kotlin
Canvas(modifier = Modifier.size(100.dp)) {
val strokeWidth = 8.dp.toPx()
drawArc(
color = Color.LightGray,
startAngle = 0f,
sweepAngle = 360f,
useCenter = false,
style = Stroke(width = strokeWidth)
)
drawArc(
color = Color.Blue,
startAngle = -90f,
sweepAngle = progress * 360f,
useCenter = false,
style = Stroke(width = strokeWidth, cap = StrokeCap.Round)
)
}
```
### 2. The `Path` API
- Use for complex shapes (Stars, Polygons, Waves).
- Use `Path()` and methods like `moveTo`, `lineTo`, `cubicTo`.
- **Rule**: Reuse the `Path` object if possible to avoid allocations in the drawing loop.
## 🚀 Performance & Tips
- [ ] **Avoid Object Allocation**: Never create `Paint`, `Path`, or `Brush` objects inside `drawBehind`. Create them with `remember` outside.
- [ ] **Use `graphicsLayer`**: Move drawing into a separate layer for better hardware acceleration and cacheability.
- [ ] **Pixel Conversion**: Use `toPx()` carefully within the `DrawScope`. Keep dimensions consistent.
- [ ] **AGSL Shaders**: For Android 13+, use `RuntimeShader` for professional-grade effects (Blur, Wave, Noise).
## 📐 Chart Design Best Practices
- **Labels**: Don't draw complex text with `drawText` if you can use `Text` composables with `Layout`.
- **Interactivity**: Use `detectDragGestures` or `detectTapGestures` to make your custom drawings interactive.
- **Smoothness**: Use `animateFloatAsState` to animate chart values during transitions.
## 🧪 Testing and Verification
- **Screenshot Testing**: ALWAYS use screenshot tests for custom Canvas components to catch pixel-level regressions.
- **Layout Inspector**: Verify that your Canvas component isn't causing excessive recompositions.
- **Hardware Profile**: Ensure the "GPU rendering" bar doesn't cross the threshold during complex animations.
## 📜 Checklist for Canvas Components
- [ ] **Accessibility**: Does the canvas component have a `clearAndSetSemantics` entry with a proper description?
- [ ] **Theming**: Does the drawing use `MaterialTheme.colorScheme` colors?
- [ ] **Density Independence**: Does it look correct on both low and high-density screens?
- [ ] **Performance**: Are expensive path calculations cached?
## 🔗 Related Resources
- [Compose Graphics Documentation](https://developer.android.com/jetpack/compose/graphics)
- [AGSL Shaders Guide](https://developer.android.com/develop/ui/views/graphics/agsl)
- [Screenshot Testing Skill](../android-screenshot-testing/SKILL.md)From prasad-vennam/Awesome-Android-AI-Agent-Skills, MIT.
More from prasad-vennam/Awesome-Android-AI-Agent-Skills
- 0.477score
android-navigation-expert
prasad-vennam
Use when scaffolding or debugging Jetpack Compose Navigation.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-ci-cd-expert
prasad-vennam
Use when setting up continuous integration/deployment (GitHub Actions), Gradle Play Publisher, Fastlane, or R8 Proguard rules for Release builds.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-media-and-image-expert
prasad-vennam
Use when loading images with Coil/Glide, implementing video playback with Media3/ExoPlayer, or handling media metadata in Android.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-design-system-m3
prasad-vennam
Use when creating Material 3 design systems, custom themes, or dynamic color implementations in Android apps with Jetpack Compose.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-code-review-expert
prasad-vennam
Use when performing a code review for Android pull requests, focusing on architecture, memory safety, and UI excellence.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-kmp-shared
prasad-vennam
Use when building Kotlin Multiplatform (KMP) shared modules, integrating with iOS, or sharing business logic across platforms.
SkillDFreshness: D★ 11Claude Code +9 - 0.476score
android-gemini-nano
prasad-vennam
Use when integrating Google Gemini Nano via AICore for on-device ML.
SkillDFreshness: D★ 11Claude Code +9 - 0.476score
android-adb-terminal
prasad-vennam
Use when interacting with Android emulators or physical devices via ADB (Android Debug Bridge).
SkillDFreshness: D★ 11Claude Code +9 - 0.476score
android-google-workspace-expert
prasad-vennam
Use when integrating Google Workspace APIs (Calendar, Drive, Docs) or implementing Google Sign-In with OAuth Scopes.
SkillDFreshness: D★ 11Claude Code +9 - 0.476score
android-accessibility
prasad-vennam
Use when improving app accessibility, ensuring WCAG compliance, or fixing TalkBack navigation for Android.
SkillDFreshness: D★ 11Claude Code +9 - 0.476score
android-design-to-code
prasad-vennam
Use when translating Figma, Sketch, or Adobe XD designs into Jetpack Compose code for Android.
SkillDFreshness: D★ 11Claude Code +9 - 0.476score
android-clean-architecture
prasad-vennam
Use when designing the architecture, data layer, domain models, or business logic for Android apps.
SkillDFreshness: D★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Mar 31, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from prasad-vennam
- 0.477score
android-ci-cd-expert
prasad-vennam
Use when setting up continuous integration/deployment (GitHub Actions), Gradle Play Publisher, Fastlane, or R8 Proguard rules for Release builds.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-code-review-expert
prasad-vennam
Use when performing a code review for Android pull requests, focusing on architecture, memory safety, and UI excellence.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-design-system-m3
prasad-vennam
Use when creating Material 3 design systems, custom themes, or dynamic color implementations in Android apps with Jetpack Compose.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-kmp-shared
prasad-vennam
Use when building Kotlin Multiplatform (KMP) shared modules, integrating with iOS, or sharing business logic across platforms.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-media-and-image-expert
prasad-vennam
Use when loading images with Coil/Glide, implementing video playback with Media3/ExoPlayer, or handling media metadata in Android.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
android-navigation-expert
prasad-vennam
Use when scaffolding or debugging Jetpack Compose Navigation.
SkillDFreshness: D★ 11Claude Code +9
Cite this page
android-custom-drawing-canvas skill. Agent Mart. https://agentmart.dev/skills/prasad-vennam-android-custom-drawing-canvas (last updated 2026-10-24)