Android UI Design Guide
Overview
Build native Android interfaces that follow Material Design 3 (Material You) by applying systematic design principles. This skill provides comprehensive guidelines for Jetpack Compose-first development with Dynamic Color, spacing, typography, and component-specific patterns optimized for Android.
When to Use This Skill
Activate this skill when:
- Building Android UI with Jetpack Compose or XML
- Creating Android app screens, layouts, or components
- Working with Android development (Kotlin, Compose, Android Studio)
- Receiving requests like:
- "Create a login screen in Compose"
- "Design an Android settings view"
- "Build a card layout for Android"
- "Make this Android UI follow Material Design"
- "Style this Compose screen"
Do NOT activate for:
- Web development
- iOS development
- Backend/server code
- Non-visual Android tasks
Core Design Philosophy
Follow Material Design 3 principles + Flexible extensions:
Material Design 3 Principles
- Expressive - Dynamic Color from user wallpaper, personalized theming
- Adaptive - Responsive layouts for phones, tablets, foldables
- Cohesive - Consistent Material components and interactions
Flexible Extensions
- Simplicity - Remove unnecessary elements, focus on core features
- Accessibility - 48x48dp touch targets, WCAG AA compliance, TalkBack support
Framework Priorities
- Primary: Jetpack Compose (declarative, modern, recommended)
- Secondary: XML Views (legacy support)
How to Use This Skill
Step 1: Load Relevant Reference
Read references/design-principles.md - Material Design 3 principles
Read references/color-system.md - Dynamic Color, Material Theme
Read references/spacing-system.md - 4dp grid, touch targets
Read references/typography.md - Roboto, Material Type Scale
Read references/component-patterns.md - Compose component best practices
Read references/anti-patterns.md - Common Android design mistakes
Step 2: Apply Component-Specific Patterns
- Button:
component-patterns.md → Button section
- Card:
component-patterns.md → Card section
- List:
component-patterns.md → LazyColumn section
- TextField:
component-patterns.md → TextField section
- Navigation:
component-patterns.md → Navigation section
- Dialog:
component-patterns.md → AlertDialog section
Step 3: Validate Against Anti-Patterns
- ❌ Hardcoded colors (no Dark Mode)
- ❌ Material Theme ignored
- ❌ Touch targets smaller than 48x48dp
- ❌ Fixed text sizes (no Type Scale)
- ❌ 4dp grid violations
- ❌ Nested scrolling
Step 4: Ensure System Consistency
4dp grid system:
- Use only: 4dp, 8dp, 12dp, 16dp, 24dp, 32dp, 48dp, 64dp
- Compose:
16.dp, .padding(16.dp)
Material Theme colors:
- Labels:
colorScheme.onSurface, colorScheme.onSurfaceVariant
- Backgrounds:
colorScheme.surface, colorScheme.surfaceVariant
- Primary actions:
colorScheme.primary
- Dynamic Color support (Android 12+)
Material Type Scale (REQUIRED):
- Display:
displayLarge, displayMedium, displaySmall
- Headline:
headlineLarge, headlineMedium, headlineSmall
- Title:
titleLarge, titleMedium, titleSmall
- Body:
bodyLarge, bodyMedium, bodySmall
- Label:
labelLarge, labelMedium, labelSmall
Resources
references/
- design-principles.md - Material Design 3 principles (Expressive, Adaptive, Cohesive)
- color-system.md - Dynamic Color, Material Theme, dark mode
- spacing-system.md - 4dp grid, touch targets, Compose modifiers
- typography.md - Roboto, Material Type Scale, font weights
- component-patterns.md - Compose patterns for Button, Card, List, TextField, Navigation, Dialog
- anti-patterns.md - Common mistakes: hardcoded colors, touch targets, Material Theme neglect
Quick Decision Tree
Android UI Component Request
│
├─ What component? → Load component-patterns.md section
│
├─ What spacing? → Use 4dp grid (spacing-system.md)
│
├─ What colors? → Material Theme + Dynamic Color (color-system.md)
│
├─ What typography? → Material Type Scale (typography.md)
│
├─ Compose or XML? → Compose first
│
└─ Validation → Check anti-patterns.md
Examples
Good Request Flow:
User: "Create a login form in Compose"
→ Read references/component-patterns.md (TextField section)
→ Apply: OutlinedTextField, Material Type Scale, 4dp spacing
→ Validate against anti-patterns.md
→ Implement with Column { OutlinedTextField, Button }
Component Implementation Checklist:
- ✅ Spacing uses 4dp multiples
- ✅ Material Type Scale used (bodyMedium, titleLarge, etc.)
- ✅ Material Theme colors (auto Dark Mode)
- ✅ Touch targets minimum 48x48dp
- ✅ Material components used
- ✅ Dynamic Color support
- ✅ Accessibility (TalkBack contentDescription)
Compose Code Examples
✅ Good: Material-Compliant Button
Button(onClick = { }) {
Text("확인")
}
✅ Good: Material Theme Colors
Card {
Column(modifier = Modifier.padding(16.dp)) {
Text(
text = "제목",
style = MaterialTheme.typography.titleLarge,
color = MaterialTheme.colorScheme.onSurface
)
Text(
text = "내용",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
❌ Bad: Hardcoded Colors, No Type Scale
Text(
text = "제목",
fontSize = 24.sp, // ❌ No Type Scale
color = Color.Black // ❌ No Dark Mode
)
Platform-Specific Considerations
Dynamic Color (Android 12+)
val colorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
dynamicLightColorScheme(LocalContext.current)
} else {
lightColorScheme()
}
Dark Mode (REQUIRED)
- Test both light and dark themes
- Use Material Theme colors
- Never hardcode
Color.Black, Color.White
Touch Targets
- Minimum 48x48dp for all interactive elements
Reference Documentation
1---2name: android-ui-design-guide3description: Apply Android/Jetpack Compose design principles following Material Design 3 when building any Android UI component. Only execute this when the current project is an Android project and involves UI-related work. Use this skill for Compose layouts, Material components, or Android app development. Ensures Material You compliance with Dynamic Color, expressive theming, 4dp grid spacing, Roboto typography with Type Scale, and native Android patterns. Prevents common anti-patterns like hardcoded colors, Dark Mode neglect, and touch target violations.4---56# Android UI Design Guide78## Overview910Build native Android interfaces that follow Material Design 3 (Material You) by applying systematic design principles. This skill provides comprehensive guidelines for Jetpack Compose-first development with Dynamic Color, spacing, typography, and component-specific patterns optimized for Android.1112## When to Use This Skill1314Activate this skill when:15- Building Android UI with Jetpack Compose or XML16- Creating Android app screens, layouts, or components17- Working with Android development (Kotlin, Compose, Android Studio)18- Receiving requests like:19 - "Create a login screen in Compose"20 - "Design an Android settings view"21 - "Build a card layout for Android"22 - "Make this Android UI follow Material Design"23 - "Style this Compose screen"2425**Do NOT activate** for:26- Web development27- iOS development28- Backend/server code29- Non-visual Android tasks3031## Core Design Philosophy3233Follow Material Design 3 principles + Flexible extensions:3435### Material Design 3 Principles36371. **Expressive** - Dynamic Color from user wallpaper, personalized theming382. **Adaptive** - Responsive layouts for phones, tablets, foldables393. **Cohesive** - Consistent Material components and interactions4041### Flexible Extensions42434. **Simplicity** - Remove unnecessary elements, focus on core features445. **Accessibility** - 48x48dp touch targets, WCAG AA compliance, TalkBack support4546## Framework Priorities4748- **Primary**: Jetpack Compose (declarative, modern, recommended)49- **Secondary**: XML Views (legacy support)5051## How to Use This Skill5253### Step 1: Load Relevant Reference5455```56Read references/design-principles.md - Material Design 3 principles57Read references/color-system.md - Dynamic Color, Material Theme58Read references/spacing-system.md - 4dp grid, touch targets59Read references/typography.md - Roboto, Material Type Scale60Read references/component-patterns.md - Compose component best practices61Read references/anti-patterns.md - Common Android design mistakes62```6364### Step 2: Apply Component-Specific Patterns6566- **Button**: `component-patterns.md` → Button section67- **Card**: `component-patterns.md` → Card section68- **List**: `component-patterns.md` → LazyColumn section69- **TextField**: `component-patterns.md` → TextField section70- **Navigation**: `component-patterns.md` → Navigation section71- **Dialog**: `component-patterns.md` → AlertDialog section7273### Step 3: Validate Against Anti-Patterns7475- ❌ Hardcoded colors (no Dark Mode)76- ❌ Material Theme ignored77- ❌ Touch targets smaller than 48x48dp78- ❌ Fixed text sizes (no Type Scale)79- ❌ 4dp grid violations80- ❌ Nested scrolling8182### Step 4: Ensure System Consistency8384**4dp grid system**:85- Use only: 4dp, 8dp, 12dp, 16dp, 24dp, 32dp, 48dp, 64dp86- Compose: `16.dp`, `.padding(16.dp)`8788**Material Theme colors**:89- Labels: `colorScheme.onSurface`, `colorScheme.onSurfaceVariant`90- Backgrounds: `colorScheme.surface`, `colorScheme.surfaceVariant`91- Primary actions: `colorScheme.primary`92- Dynamic Color support (Android 12+)9394**Material Type Scale** (REQUIRED):95- Display: `displayLarge`, `displayMedium`, `displaySmall`96- Headline: `headlineLarge`, `headlineMedium`, `headlineSmall`97- Title: `titleLarge`, `titleMedium`, `titleSmall`98- Body: `bodyLarge`, `bodyMedium`, `bodySmall`99- Label: `labelLarge`, `labelMedium`, `labelSmall`100101## Resources102103### references/104105- **design-principles.md** - Material Design 3 principles (Expressive, Adaptive, Cohesive)106- **color-system.md** - Dynamic Color, Material Theme, dark mode107- **spacing-system.md** - 4dp grid, touch targets, Compose modifiers108- **typography.md** - Roboto, Material Type Scale, font weights109- **component-patterns.md** - Compose patterns for Button, Card, List, TextField, Navigation, Dialog110- **anti-patterns.md** - Common mistakes: hardcoded colors, touch targets, Material Theme neglect111112## Quick Decision Tree113114```115Android UI Component Request116│117├─ What component? → Load component-patterns.md section118│119├─ What spacing? → Use 4dp grid (spacing-system.md)120│121├─ What colors? → Material Theme + Dynamic Color (color-system.md)122│123├─ What typography? → Material Type Scale (typography.md)124│125├─ Compose or XML? → Compose first126│127└─ Validation → Check anti-patterns.md128```129130## Examples131132**Good Request Flow**:133```134User: "Create a login form in Compose"135→ Read references/component-patterns.md (TextField section)136→ Apply: OutlinedTextField, Material Type Scale, 4dp spacing137→ Validate against anti-patterns.md138→ Implement with Column { OutlinedTextField, Button }139```140141**Component Implementation Checklist**:142- ✅ Spacing uses 4dp multiples143- ✅ Material Type Scale used (bodyMedium, titleLarge, etc.)144- ✅ Material Theme colors (auto Dark Mode)145- ✅ Touch targets minimum 48x48dp146- ✅ Material components used147- ✅ Dynamic Color support148- ✅ Accessibility (TalkBack contentDescription)149150## Compose Code Examples151152### ✅ Good: Material-Compliant Button153154```kotlin155Button(onClick = { }) {156 Text("확인")157}158```159160### ✅ Good: Material Theme Colors161162```kotlin163Card {164 Column(modifier = Modifier.padding(16.dp)) {165 Text(166 text = "제목",167 style = MaterialTheme.typography.titleLarge,168 color = MaterialTheme.colorScheme.onSurface169 )170 Text(171 text = "내용",172 style = MaterialTheme.typography.bodyMedium,173 color = MaterialTheme.colorScheme.onSurfaceVariant174 )175 }176}177```178179### ❌ Bad: Hardcoded Colors, No Type Scale180181```kotlin182Text(183 text = "제목",184 fontSize = 24.sp, // ❌ No Type Scale185 color = Color.Black // ❌ No Dark Mode186)187```188189## Platform-Specific Considerations190191### Dynamic Color (Android 12+)192```kotlin193val colorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {194 dynamicLightColorScheme(LocalContext.current)195} else {196 lightColorScheme()197}198```199200### Dark Mode (REQUIRED)201- Test both light and dark themes202- Use Material Theme colors203- Never hardcode `Color.Black`, `Color.White`204205### Touch Targets206- Minimum 48x48dp for all interactive elements207208## Reference Documentation209210- [Material Design 3](https://m3.material.io/)211- [Jetpack Compose](https://developer.android.com/jetpack/compose)212- [Material Theme Builder](https://m3.material.io/theme-builder)