Back to Mobile Development

mobile-android-design

AndroidJetpack ComposeMaterial Design 3UI/UXMobile DevelopmentAndroid UINative AndroidApp Design
36.8k📄 MIT🕒 2026-06-16Source ↗

Install this skill

npx skills add wshobson/agents

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

Mobile-android-design focuses on architecting modern user interfaces specifically for the Android platform using Jetpack Compose and Material Design 3 guidelines. This skill facilitates the creation of responsive, high-performance layouts that scale across various device form factors, including foldables and tablets. By implementing the M3 component library—such as navigation rails, dynamic color schemes, and adaptive grids—this skill ensures that applications adhere to current Google UI standards. It manages complex state-driven transitions and navigation graphs using Compose Navigation. Developers can build accessible, visually cohesive apps that respond to user system preferences while maintaining a clean, declarative codebase. This skill streamlines the translation of design tokens into actionable UI code, ensuring consistent spacing, typography, and interactive elements across all screens.

When to Use This Skill

  • Refactoring legacy XML views into modern declarative Compose screens
  • Building responsive dashboards that shift from single-pane to multi-pane layouts on tablets
  • Integrating system-wide dynamic themes into an existing application
  • Managing complex navigation states within a multi-module project

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • implement a Material 3 bottom navigation bar
  • convert this screen to a Jetpack Compose lazy grid
  • create a responsive scaffold layout for foldable devices
  • apply dynamic color theming to my Compose app
  • setup navigation between screens in Jetpack Compose

Pro Tips

  • 💡Always prioritize semantic composables (e.g., `Button`, `Card`, `Scaffold`) over raw `Box`/`Column`/`Row` for better accessibility and maintainability.
  • 💡Embrace Modifier chaining to create concise and readable UI definitions, enhancing performance by reducing unnecessary recompositions.
  • 💡Leverage the Android Studio Compose Preview extensively for rapid UI iteration and testing across different configurations (dark mode, locales, screen sizes) before deploying to a device.

What this skill does

  • Building declarative UI hierarchies using Jetpack Compose layouts
  • Implementing adaptive navigation patterns like rails and bottom bars
  • Applying Material Design 3 theming with dynamic color systems
  • Developing performance-optimized lists via LazyColumn and LazyVerticalGrid
  • Configuring state-aware navigation graphs with deep-link support

When not to use it

  • Developing cross-platform mobile apps using non-native frameworks like React Native or Flutter
  • Creating low-level graphic engines where OpenGL or Vulkan is strictly required

Example workflow

  1. Define the navigation graph with routes for all primary screens
  2. Establish the central theme using M3 color schemes and typography
  3. Draft the scaffold to house the top-level navigation components
  4. Compose individual screens using layout primitives like Column and Row
  5. Inject state-management logic to update UI based on user input

Prerequisites

  • Basic proficiency in Kotlin
  • Android Studio environment setup
  • Familiarity with Compose state principles

Pitfalls & limitations

  • !Over-nesting layouts leading to performance degradation in deep view hierarchies
  • !Improper state handling causing unnecessary recompositions during navigation transitions
  • !Ignoring accessibility labels, breaking screen reader functionality

FAQ

How does Material 3 differ from previous versions?
Material 3 emphasizes dynamic coloring based on user wallpapers and more personal design tokens compared to the flatter, predefined palettes of earlier iterations.
Is Jetpack Compose mandatory for M3 designs?
While you can use M3 with older View-based systems, Jetpack Compose is built to natively support the newest M3 components and adaptive layout behaviors.
How do I handle different screen sizes in my layout?
You should use window size classes to detect display dimensions and conditionally swap between navigation components like rails or bottom bars.

How it compares

Unlike manual UI construction which requires managing separate XML layout files and ViewBinding, this skill leverages declarative Compose code that unifies design logic and view structure in a single source of truth.

Source & trust

37k stars📄 MIT🕒 Updated 2026-06-16
📄 Full skill instructions — original source: wshobson/agents
# Android Mobile Design

Master Material Design 3 (Material You) and Jetpack Compose to build modern, adaptive Android applications that integrate seamlessly with the Android ecosystem.

## When to Use This Skill

- Designing Android app interfaces following Material Design 3
- Building Jetpack Compose UI and layouts
- Implementing Android navigation patterns (Navigation Compose)
- Creating adaptive layouts for phones, tablets, and foldables
- Using Material 3 theming with dynamic colors
- Building accessible Android interfaces
- Implementing Android-specific gestures and interactions
- Designing for different screen configurations

## Core Concepts

### 1. Material Design 3 Principles

**Personalization**: Dynamic color adapts UI to user's wallpaper
**Accessibility**: Tonal palettes ensure sufficient color contrast
**Large Screens**: Responsive layouts for tablets and foldables

**Material Components:**

- Cards, Buttons, FABs, Chips
- Navigation (rail, drawer, bottom nav)
- Text fields, Dialogs, Sheets
- Lists, Menus, Progress indicators

### 2. Jetpack Compose Layout System

**Column and Row:**

// Vertical arrangement with alignment
Column(
modifier = Modifier.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(12.dp),
horizontalAlignment = Alignment.Start
) {
Text(
text = "Title",
style = MaterialTheme.typography.headlineSmall
)
Text(
text = "Subtitle",
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}

// Horizontal arrangement with weight
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Icon(Icons.Default.Star, contentDescription = null)
Text("Featured")
Spacer(modifier = Modifier.weight(1f))
TextButton(onClick = {}) {
Text("View All")
}
}


**Lazy Lists and Grids:**

// Lazy column with sticky headers
LazyColumn {
items.groupBy { it.category }.forEach { (category, categoryItems) ->
stickyHeader {
Text(
text = category,
modifier = Modifier
.fillMaxWidth()
.background(MaterialTheme.colorScheme.surface)
.padding(16.dp),
style = MaterialTheme.typography.titleMedium
)
}
items(categoryItems) { item ->
ItemRow(item = item)
}
}
}

// Adaptive grid
LazyVerticalGrid(
columns = GridCells.Adaptive(minSize = 150.dp),
contentPadding = PaddingValues(16.dp),
horizontalArrangement = Arrangement.spacedBy(12.dp),
verticalArrangement = Arrangement.spacedBy(12.dp)
) {
items(items) { item ->
ItemCard(item = item)
}
}


### 3. Navigation Patterns

**Bottom Navigation:**

@Composable
fun MainScreen() {
val navController = rememberNavController()

Scaffold(
bottomBar = {
NavigationBar {
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentDestination = navBackStackEntry?.destination

NavigationDestination.entries.forEach { destination ->
NavigationBarItem(
icon = { Icon(destination.icon, contentDescription = null) },
label = { Text(destination.label) },
selected = currentDestination?.hierarchy?.any {
it.route == destination.route
} == true,
onClick = {
navController.navigate(destination.route) {
popUpTo(navController.graph.findStartDestination().id) {
saveState = true
}
launchSingleTop = true
restoreState = true
}
}
)
}
}
}
) { innerPadding ->
NavHost(
navController = navController,
startDestination = NavigationDestination.Home.route,
modifier = Modifier.padding(innerPadding)
) {
composable(NavigationDestination.Home.route) { HomeScreen() }
composable(NavigationDestination.Search.route) { SearchScreen() }
composable(NavigationDestination.Profile.route) { ProfileScreen() }
}
}
}


**Navigation Drawer:**

@Composable
fun DrawerNavigation() {
val drawerState = rememberDrawerState(DrawerValue.Closed)
val scope = rememberCoroutineScope()

ModalNavigationDrawer(
drawerState = drawerState,
drawerContent = {
ModalDrawerSheet {
Spacer(Modifier.height(12.dp))
Text(
"App Name",
modifier = Modifier.padding(16.dp),
style = MaterialTheme.typography.titleLarge
)
HorizontalDivider()

NavigationDrawerItem(
icon = { Icon(Icons.Default.Home, null) },
label = { Text("Home") },
selected = true,
onClick = { scope.launch { drawerState.close() } }
)
NavigationDrawerItem(
icon = { Icon(Icons.Default.Settings, null) },
label = { Text("Settings") },
selected = false,
onClick = { }
)
}
}
) {
Scaffold(
topBar = {
TopAppBar(
title = { Text("Home") },
navigationIcon = {
IconButton(onClick = { scope.launch { drawerState.open() } }) {
Icon(Icons.Default.Menu, contentDescription = "Menu")
}
}
)
}
) { innerPadding ->
Content(modifier = Modifier.padding(innerPadding))
}
}
}


### 4. Material 3 Theming

**Color Scheme:**

// Dynamic color (Android 12+)
val dynamicColorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context)
else dynamicLightColorScheme(context)
} else {
if (darkTheme) DarkColorScheme else LightColorScheme
}

// Custom color scheme
private val LightColorScheme = lightColorScheme(
primary = Color(0xFF6750A4),
onPrimary = Color.White,
primaryContainer = Color(0xFFEADDFF),
onPrimaryContainer = Color(0xFF21005D),
secondary = Color(0xFF625B71),
onSecondary = Color.White,
tertiary = Color(0xFF7D5260),
onTertiary = Color.White,
surface = Color(0xFFFFFBFE),
onSurface = Color(0xFF1C1B1F),
)


**Typography:**

val AppTypography = Typography(
displayLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 57.sp,
lineHeight = 64.sp
),
headlineMedium = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 28.sp,
lineHeight = 36.sp
),
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 22.sp,
lineHeight = 28.sp
),
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp
),
labelMedium = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 12.sp,
lineHeight = 16.sp
)
)


### 5. Component Examples

**Cards:**

@Composable
fun FeatureCard(
title: String,
description: String,
imageUrl: String,
onClick: () -> Unit
) {
Card(
onClick = onClick,
modifier = Modifier.fillMaxWidth(),
shape = RoundedCornerShape(16.dp),
colors = CardDefaults.cardColors(
containerColor = MaterialTheme.colorScheme.surfaceVariant
)
) {
Column {
AsyncImage(
model = imageUrl,
contentDescription = null,
modifier = Modifier
.fillMaxWidth()
.height(180.dp),
contentScale = ContentScale.Crop
)
Column(modifier = Modifier.padding(16.dp)) {
Text(
text = title,
style = MaterialTheme.typography.titleMedium
)
Spacer(modifier = Modifier.height(8.dp))
Text(
text = description,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}
}


**Buttons:**

// Filled button (primary action)
Button(onClick = { }) {
Text("Continue")
}

// Filled tonal button (secondary action)
FilledTonalButton(onClick = { }) {
Icon(Icons.Default.Add, null)
Spacer(Modifier.width(8.dp))
Text("Add Item")
}

// Outlined button
OutlinedButton(onClick = { }) {
Text("Cancel")
}

// Text button
TextButton(onClick = { }) {
Text("Learn More")
}

// FAB
FloatingActionButton(
onClick = { },
containerColor = MaterialTheme.colorScheme.primaryContainer,
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
) {
Icon(Icons.Default.Add, contentDescription = "Add")
}


## Quick Start Component

@Composable
fun ItemListCard(
item: Item,
onItemClick: () -> Unit,
modifier: Modifier = Modifier
) {
Card(
onClick = onItemClick,
modifier = modifier.fillMaxWidth(),
shape = RoundedCornerShape(12.dp)
) {
Row(
modifier = Modifier
.padding(16.dp)
.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically
) {
Box(
modifier = Modifier
.size(48.dp)
.clip(CircleShape)
.background(MaterialTheme.colorScheme.primaryContainer),
contentAlignment = Alignment.Center
) {
Icon(
imageVector = Icons.Default.Star,
contentDescription = null,
tint = MaterialTheme.colorScheme.onPrimaryContainer
)
}

Spacer(modifier = Modifier.width(16.dp))

Column(modifier = Modifier.weight(1f)) {
Text(
text = item.title,
style = MaterialTheme.typography.titleMedium
)
Text(
text = item.subtitle,
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant
)
}

Icon(
imageVector = Icons.Default.ChevronRight,
contentDescription = null,
tint = MaterialTheme.colorScheme.onSurfaceVariant
)
}
}
}


## Best Practices

1. **Use Material Theme**: Access colors via MaterialTheme.colorScheme for automatic dark mode support
2. **Support Dynamic Color**: Enable dynamic color on Android 12+ for personalization
3. **Adaptive Layouts**: Use WindowSizeClass for responsive designs
4. **Content Descriptions**: Add contentDescription to all interactive elements
5. **Touch Targets**: Minimum 48dp touch targets for accessibility
6. **State Hoisting**: Hoist state to make components reusable and testable
7. **Remember Properly**: Use remember and rememberSaveable appropriately
8. **Preview Annotations**: Add @Preview with different configurations

## Common Issues

- **Recomposition Issues**: Avoid passing unstable lambdas; use remember
- **State Loss**: Use rememberSaveable for configuration changes
- **Performance**: Use LazyColumn instead of Column for long lists
- **Theme Leaks**: Ensure MaterialTheme wraps all composables
- **Navigation Crashes**: Handle back press and deep links properly
- **Memory Leaks**: Cancel coroutines in DisposableEffect

## Resources

- [Material Design 3](https://m3.material.io/)
- [Jetpack Compose Documentation](https://developer.android.com/jetpack/compose)
- [Compose Samples](https://github.com/android/compose-samples)
- [Material 3 Compose](https://developer.android.com/jetpack/compose/designsystems/material3)

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/mobile-android-design/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/wshobson/agents/mobile-android-design/SKILL.md
  • Cursor: ~/.cursor/skills/wshobson/agents/mobile-android-design/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/wshobson/agents/mobile-android-design/SKILL.md

🚀 Install with CLI:
npx skills add wshobson/agents

Read the Master Guide: Mastering Agent Skills

Related Skill Units

Recommended Rules

View more rules

Recommended Workflows

View more workflows

Recommended MCP Servers

View more MCP servers

Take It Further

Maximize your productivity with these powerful resources

📋

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
📖

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid mobile development issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Mobile Development and is published by W. Shobson, maintained in wshobson/agents.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.