Mobile Android Design

Mobile Android Design

Teaches an AI coding agent Material Design 3 and Jetpack Compose patterns for building adaptive, accessible native Android interfaces with theming and navigation.

Skill files5 files

references/

SKILL.md102 lines
1
---
2
name: mobile-android-design
3
description: Master Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.
4
---
5
6
# Android Mobile Design
7
8
Master Material Design 3 (Material You) and Jetpack Compose to build modern, adaptive Android applications that integrate seamlessly with the Android ecosystem.
9
10
## When to Use This Skill
11
12
- Designing Android app interfaces following Material Design 3
13
- Building Jetpack Compose UI and layouts
14
- Implementing Android navigation patterns (Navigation Compose)
15
- Creating adaptive layouts for phones, tablets, and foldables
16
- Using Material 3 theming with dynamic colors
17
- Building accessible Android interfaces
18
- Implementing Android-specific gestures and interactions
19
- Designing for different screen configurations
20
21
## Detailed section: Core Concepts
22
23
Originally a 9201-byte section in this SKILL.md. Moved to `references/details.md` to fit Codex's 8 KB skill body cap.
24
25
## Quick Start Component
26
27
```kotlin
28
@Composable
29
fun ItemListCard(
30
item: Item,
31
onItemClick: () -> Unit,
32
modifier: Modifier = Modifier
33
) {
34
Card(
35
onClick = onItemClick,
36
modifier = modifier.fillMaxWidth(),
37
shape = RoundedCornerShape(12.dp)
38
) {
39
Row(
40
modifier = Modifier
41
.padding(16.dp)
42
.fillMaxWidth(),
43
verticalAlignment = Alignment.CenterVertically
44
) {
45
Box(
46
modifier = Modifier
47
.size(48.dp)
48
.clip(CircleShape)
49
.background(MaterialTheme.colorScheme.primaryContainer),
50
contentAlignment = Alignment.Center
51
) {
52
Icon(
53
imageVector = Icons.Default.Star,
54
contentDescription = null,
55
tint = MaterialTheme.colorScheme.onPrimaryContainer
56
)
57
}
58
59
Spacer(modifier = Modifier.width(16.dp))
60
61
Column(modifier = Modifier.weight(1f)) {
62
Text(
63
text = item.title,
64
style = MaterialTheme.typography.titleMedium
65
)
66
Text(
67
text = item.subtitle,
68
style = MaterialTheme.typography.bodyMedium,
69
color = MaterialTheme.colorScheme.onSurfaceVariant
70
)
71
}
72
73
Icon(
74
imageVector = Icons.Default.ChevronRight,
75
contentDescription = null,
76
tint = MaterialTheme.colorScheme.onSurfaceVariant
77
)
78
}
79
}
80
}
81
```
82
83
## Best Practices
84
85
1. **Use Material Theme**: Access colors via `MaterialTheme.colorScheme` for automatic dark mode support
86
2. **Support Dynamic Color**: Enable dynamic color on Android 12+ for personalization
87
3. **Adaptive Layouts**: Use `WindowSizeClass` for responsive designs
88
4. **Content Descriptions**: Add `contentDescription` to all interactive elements
89
5. **Touch Targets**: Minimum 48dp touch targets for accessibility
90
6. **State Hoisting**: Hoist state to make components reusable and testable
91
7. **Remember Properly**: Use `remember` and `rememberSaveable` appropriately
92
8. **Preview Annotations**: Add `@Preview` with different configurations
93
94
## Common Issues
95
96
- **Recomposition Issues**: Avoid passing unstable lambdas; use `remember`
97
- **State Loss**: Use `rememberSaveable` for configuration changes
98
- **Performance**: Use `LazyColumn` instead of `Column` for long lists
99
- **Theme Leaks**: Ensure `MaterialTheme` wraps all composables
100
- **Navigation Crashes**: Handle back press and deep links properly
101
- **Memory Leaks**: Cancel coroutines in `DisposableEffect`
102

© Seth Hobson · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 11,573 prompts

More by @OpenSourceBuffGuy

See all
Acid Lime Cutout Zine Poster Style prompt image

Acid Lime Cutout Zine Poster Style

Defines a loud youth-collage poster style with acid-lime fields, torn black paper, grayscale photocopy cutouts and graffiti lettering, with slots for subject, props and text.

image-prompt, json-prompt, placeholders, poster, collage, typography, graffiti, vibrant-colors, text-rendering, vertical-format, widescreen, graphic-design, for-designers, for-artists, black-and-white, limited-palette, long-form, advanced, structured-output, style-reference, neon, negative-prompt, zine

Bulma V1 prompt image

Bulma V1

Teaches the coding agent Bulma v1 conventions: Dart Sass modules, CSS variables, themes and dark mode, the smart grid and skeletons, avoiding old 0.9 patterns.

rule-file, css, best-practices, frontend, web-design, html, web-development, for-developers, design-systems, cheat-sheet, style-guide, accessibility, react, vue, long-form, checklist, migration, guardrails

Retention Specialist prompt image

Retention Specialist

Acts as a customer retention specialist who diagnoses churn, segments at-risk customers and designs cancellation flows, tiered save offers and win-back campaigns.

system-prompt, act-as, customer-success, saas, playbook, customer-service, marketing, email-marketing, for-marketers, for-managers, xml-tags, structured-output, classification, pricing, kpis, expert-advice, business-strategy, step-by-step-guide, persuasive, advanced, strategy

Reviews

Loading reviews…

Discussion

Loading comments…