Introduction
Android design is centered around Material Design, Google’s comprehensive design system for creating intuitive, consistent, and beautiful user experiences across platforms and device sizes. This cheat sheet provides essential guidelines, specifications, and best practices for designing Android applications that adhere to Material Design principles while providing optimal user experiences.
Core Material Design Principles
Design Philosophy
- Material as a metaphor: Interface elements behave like physical materials with surfaces, edges, and movements
- Bold, graphic, intentional: Elements should be visually distinctive and deliberate
- Motion provides meaning: Animations should guide users and provide visual feedback
Design Pillars
Pillar | Description |
---|---|
Material You | Personalized design system adapting to user preferences |
Accessibility | Designs usable by everyone, including those with disabilities |
Adaptability | Responsive layouts for all screen sizes and orientations |
Cross-platform | Consistent experience across Android, web, and other platforms |
Brand expression | Framework for expressing unique brand identity |
Layout Fundamentals
Screen Dimensions and Density
Common Screen Sizes
Device Type | Size Range (diagonal) | Common Resolutions |
---|---|---|
Phones | 4.0″ – 6.7″ | 720 × 1280px (HD)<br>1080 × 1920px (FHD)<br>1440 × 2560px (QHD) |
Tablets | 7.0″ – 13.0″ | 1200 × 1920px<br>1600 × 2560px<br>2560 × 1600px |
Foldables | 6.0″ – 8.0″ (folded)<br>7.3″ – 10.0″ (unfolded) | Varies by model |
Density Buckets
Density | DPI Range | Scaling Factor |
---|---|---|
ldpi | ~120dpi | 0.75x |
mdpi | ~160dpi | 1.0x (baseline) |
hdpi | ~240dpi | 1.5x |
xhdpi | ~320dpi | 2.0x |
xxhdpi | ~480dpi | 3.0x |
xxxhdpi | ~640dpi | 4.0x |
Responsive Layout Grid
Grid Anatomy
- Columns: Content containers that scale with screen size
- Gutters: Spaces between columns
- Margins: Space between content and screen edges
Common Grid Patterns
Screen Size | Column Count | Margin Width | Gutter Width |
---|---|---|---|
Phone (small) | 4 columns | 16dp | 8dp |
Phone (medium) | 4-8 columns | 16-24dp | 8-16dp |
Tablet | 8-12 columns | 24-48dp | 16-24dp |
Key Layout Measurements
Basic Spacing
Element | Dimension | Notes |
---|---|---|
Touch targets | 48 × 48dp minimum | For buttons, icons, and interactive elements |
Element spacing | 8dp increments | Use multiples of 8dp for consistency (8, 16, 24, etc.) |
Content padding | 16dp typical | Standard inner padding for containers |
Screen margins | 16dp typical | Standard screen edge margins |
Component Placement
- App bars: 56dp height (portrait), 48dp height (landscape)
- Navigation bars: 80dp height (bottom), 56dp height (side)
- Floating Action Button (FAB): 16dp margins from screen edge
- Bottom sheets: 56dp peek height minimum
Typography
Type Scale
Style | Weight | Size | Line Height | Letter Spacing | Usage |
---|---|---|---|---|---|
Display Large | 400 (Regular) | 57sp | 64dp | -0.25px | Large headers, splash screens |
Display Medium | 400 (Regular) | 45sp | 52dp | 0px | Major section headers |
Display Small | 400 (Regular) | 36sp | 44dp | 0px | Medium headers |
Headline Large | 400 (Regular) | 32sp | 40dp | 0px | Important headlines |
Headline Medium | 400 (Regular) | 28sp | 36dp | 0px | Headers, dialogs |
Headline Small | 400 (Regular) | 24sp | 32dp | 0px | Secondary headers |
Title Large | 400 (Regular) | 22sp | 28dp | 0px | Card titles, major labels |
Title Medium | 500 (Medium) | 16sp | 24dp | 0.15px | Primary button text, dialog titles |
Title Small | 500 (Medium) | 14sp | 20dp | 0.1px | Button text, emphasized small text |
Body Large | 400 (Regular) | 16sp | 24dp | 0.5px | Primary body text |
Body Medium | 400 (Regular) | 14sp | 20dp | 0.25px | Secondary body text |
Body Small | 400 (Regular) | 12sp | 16dp | 0.4px | Help text, captions |
Label Large | 500 (Medium) | 14sp | 20dp | 0.1px | Medium emphasis labels |
Label Medium | 500 (Medium) | 12sp | 16dp | 0.5px | Small labels |
Label Small | 500 (Medium) | 11sp | 16dp | 0.5px | Smallest readable text |
Font Recommendations
- Roboto: Android’s default system font through Android 11
- Google Sans: Used for product branding and headlines
- Product Sans: For Google product logos
- System default: Respects user’s system font choice on Android 12+
Text Styling Best Practices
- Use hierarchical typography with clear visual distinction between levels
- Keep body text at 16sp minimum for readability
- Use appropriate weights to create emphasis (rather than just size changes)
- Maintain high contrast ratios (4.5:1 minimum for accessibility)
- Consider line length (aim for 40-60 characters per line)
- Use dynamic text sizing (sp units) to respect user’s system font size settings
Color System
Material Theme Color Roles
Primary Color Palette
Role | Usage | Requirements |
---|---|---|
Primary | Main brand color | High contrast with text |
On Primary | Text/icons on primary surfaces | 4.5:1 minimum contrast with primary |
Primary Container | Container backgrounds | Lightened/darkened version of primary |
On Primary Container | Text on primary containers | 4.5:1 minimum contrast with primary container |
Secondary Color Palette
Role | Usage | Requirements |
---|---|---|
Secondary | Accent color, highlights | Complement to primary color |
On Secondary | Text/icons on secondary | 4.5:1 minimum contrast |
Secondary Container | Accented containers | Tinted backgrounds |
On Secondary Container | Text on secondary containers | 4.5:1 minimum contrast |
Additional Color Roles
Role | Usage | Notes |
---|---|---|
Tertiary | Additional accent | Used sparingly for emphasis |
Error | Error states, alerts | Typically red-based |
Background | Screen backgrounds | Light in light theme, dark in dark theme |
Surface | Cards, sheets, dialogs | Light in light theme, dark in dark theme |
Surface Variant | Alternative surfaces | For visual separation |
Outline | Boundaries, dividers | Low-emphasis separation |
Dark Theme Considerations
- Saturation Differences: Colors typically higher saturation in dark theme
- Surface Colors: Multiple surface tonal variations (surface1, surface2, etc.)
- Elevation Effect: Higher elevation surfaces appear lighter in dark theme
- Content Contrast: Light text on dark backgrounds requires different weight/size considerations
Color Accessibility
- Ensure 4.5:1 contrast ratio for normal text (14pt and smaller)
- Ensure 3:1 contrast ratio for large text (14pt bold or 18pt+)
- Test designs in grayscale for color blindness compatibility
- Don’t rely solely on color to convey information
- Use Material Theme Builder to generate accessible color schemes
Component Guidelines
Common UI Components
Buttons
Type | Usage | Dimensions |
---|---|---|
Filled | Primary actions | Height: 40dp<br>Min width: 64dp<br>Padding: 16dp horizontal |
Outlined | Secondary actions | Height: 40dp<br>Border: 1dp<br>Padding: 16dp horizontal |
Text | Tertiary actions | Height: 40dp<br>Min width: 64dp<br>Padding: 8dp horizontal |
Icon | Compact actions | Size: 40 × 40dp<br>Icon: 24 × 24dp |
FAB | Primary screen action | Size: 56 × 56dp (standard)<br>40 × 40dp (small)<br>96 × 96dp (large) |
Text Fields
Type | Usage | Dimensions |
---|---|---|
Filled | Standard input | Height: 56dp<br>Padding: 16dp horizontal |
Outlined | Alternative input style | Height: 56dp<br>Padding: 16dp horizontal<br>Border: 1dp |
Text Area | Multiline input | Min height: 112dp<br>Padding: 16dp |
Cards
Type | Usage | Specifications |
---|---|---|
Elevated | Standalone content | Elevation: 1dp<br>Radius: 12dp<br>Padding: 16dp |
Filled | Grouped content | Elevation: 0dp<br>Radius: 12dp<br>Background: surface variant |
Outlined | Bounded content | Border: 1dp<br>Radius: 12dp<br>Padding: 16dp |
Selection Controls
Type | Dimensions | States |
---|---|---|
Checkbox | Touch area: 48 × 48dp<br>Icon: 18 × 18dp | Unchecked, checked, indeterminate |
Radio button | Touch area: 48 × 48dp<br>Icon: 20 × 20dp | Selected, unselected |
Switch | Track: 52 × 32dp<br>Thumb: 24 × 24dp | On, off |
Navigation Elements
Type | Usage | Dimensions |
---|---|---|
Bottom navigation | 3-5 destinations | Height: 80dp<br>Icon: 24dp<br>Label: 12sp |
Navigation rail | Tablet/desktop nav | Width: 80dp<br>Icon: 24dp<br>Label: 12sp |
Navigation drawer | Many destinations | Width: 360dp (standard)<br>Width: 256dp (modal) |
Top app bar | Screen context | Height: 64dp (center)<br>Height: 56dp (small) |
Tabs | Content categories | Height: 48dp<br>Padding: 16dp horizontal |
Component Spacing
- Button content: 8dp between icon and label
- List items: 16dp vertical spacing
- Card content: 8dp between elements
- Dialog padding: 24dp
- Form fields: 16dp vertical spacing
Motion and Animation
Animation Duration Guidelines
Type | Duration | Usage |
---|---|---|
Small | 100-150ms | Small UI element changes |
Medium | 200-300ms | Most transitions, page changes |
Large | 300-400ms | Complex animations, entrances |
Extra large | 400-500ms | Full-screen transitions |
Common Animation Patterns
Pattern | Usage | Specifications |
---|---|---|
Shared element transition | Object continuity | Element morphs between screens |
Fade through | Content change | Fade out, then fade in new content |
Container transform | Expanding elements | Element expands to new container |
Fade | Subtle changes | Simple opacity changes |
Scale | Emphasis | Size changes with easing |
Material motion | Physical motion | Follows physics properties |
Easing Curves
Type | Function | Usage |
---|---|---|
Standard | cubic-bezier(0.2, 0.0, 0.0, 1.0) | Most transitions |
Accelerate | cubic-bezier(0.3, 0.0, 1.0, 1.0) | Elements exiting screen |
Decelerate | cubic-bezier(0.0, 0.0, 0.2, 1.0) | Elements entering screen |
Sharp | cubic-bezier(0.4, 0.0, 0.6, 1.0) | Quick transitions |
Iconography
System Icons
- Size: 24 × 24dp baseline
- Touch target: 48 × 48dp minimum
- Keyline: Place icons on 16dp or 24dp increments from screen edge
- Padding: 4dp padding within 24dp frame (resulting in 20 × 20dp visual size)
Icon Guidelines
Type | Usage | Specifications |
---|---|---|
Product icons | App launcher icons | Adaptive icon format with:<br>- Foreground: 108 × 108dp centered in 108 × 108dp transparent space<br>- Background: 108 × 108dp |
System icons | UI functionality | 24 × 24dp with 2dp stroke width |
Small icons | Secondary actions | 20 × 20dp with 2dp stroke width |
Icon States
State | Appearance |
---|---|
Enabled | 100% opacity |
Disabled | 38% opacity |
Pressed | Ripple effect |
Selected | Filled or highlighted |
Accessibility Guidelines
Touch Target Sizes
- Minimum size: 48 × 48dp for all interactive elements
- Spacing: 8dp minimum space between touch targets
- Density: Avoid crowding interactive elements
Content Guidelines
- Text contrast: 4.5:1 minimum for normal text, 3:1 for large text
- Non-text contrast: 3:1 minimum for interface components and graphics
- Text size: Minimum 12sp for all readable text
- Content scaling: Support system font size adjustments up to 200%
Screen Reader Support
- Provide meaningful content descriptions for all images and icons
- Use proper semantic markup (headings, lists, etc.)
- Maintain logical focus order
- Group related elements with containers
- Use Android’s accessibility services and testing tools
Input Methods
- Support keyboard navigation
- Provide alternative input methods
- Make gestures simple and consistent
- Include visible focus indicators
Common Design Patterns
Navigation Patterns
Pattern | Best For | Notes |
---|---|---|
Bottom navigation | Mobile apps with 3-5 key destinations | Provides direct access to primary destinations |
Navigation drawer | Apps with many top-level destinations | Good for complex navigation hierarchies |
Navigation rail | Tablet/desktop layouts | Side navigation for larger screens |
Tabs | Switching between related content | Use for peer content at same hierarchy level |
Up button | Moving up navigation hierarchy | Always show when not at top level |
Content Display Patterns
Pattern | Best For | Notes |
---|---|---|
Lists | Collections of items | Use dividers or spacing for clarity |
Grids | Visual collections | Good for image-heavy content |
Cards | Grouped content | Contain related information in discrete units |
Expandable panels | Progressive disclosure | Hide secondary content until needed |
Bottom sheets | Supplementary content | Surface from bottom without full-screen transition |
Form Patterns
Pattern | Best For | Notes |
---|---|---|
Inline validation | Real-time feedback | Show errors as user types |
Stepped forms | Complex data entry | Break into logical sections |
Autocomplete | Reducing typing | Suggest options as user types |
Selection controls | Binary choices | Use appropriate control for context |
Pickers | Standardized input | Date, time, color selectors |
Common Challenges and Solutions
Responsive Design Challenges
Challenge | Solution |
---|---|
Different screen sizes | Use responsive grid system with breakpoints |
Orientation changes | Test layouts in both portrait and landscape modes |
Split screen support | Design flexible layouts that adapt to reduced width |
Foldable devices | Consider continuity across fold, test on emulators |
Multi-window mode | Ensure UI remains usable at minimum sizes (220dp width) |
Dark Theme Implementation
Challenge | Solution |
---|---|
Color shifting | Use Material Color Utilities to generate appropriate dark variants |
Image compatibility | Provide alternative assets or apply filters for dark theme |
Elevation perception | Use surface tonal variations instead of shadows in dark theme |
System bars | Adapt status and navigation bar colors to match theme |
Testing | Verify contrast ratios remain accessible in dark theme |
Performance Considerations
Challenge | Solution |
---|---|
Animation jank | Keep animations simple, test on low-end devices |
Large images | Use appropriate resolution for screen density |
Complex layouts | Minimize nested ViewGroups, use ConstraintLayout |
Transition stuttering | Use hardware acceleration, optimize animations |
Battery drain | Minimize animations, use dark theme where possible |
Best Practices and Tips
Design Workflow Tips
- Start with wireframes before adding visual design elements
- Use a component-first approach with Material Design components
- Test designs across multiple device sizes early in the process
- Create a consistent visual language throughout your app
- Maintain a design system with reusable components
Visual Hierarchy
- Direct user attention with size, color, and spacing
- Create clear relationship between elements with alignment
- Use white space strategically to group and separate content
- Apply the 60-30-10 rule for color distribution (primary, secondary, accent)
- Design for F-pattern and Z-pattern reading flows
UI Polish Techniques
- Maintain consistent padding and alignment throughout
- Use subtle animations for feedback and transitions
- Ensure touch targets are appropriately sized
- Apply elevation consistently for depth perception
- Test color schemes in various lighting conditions
Performance Optimization
- Optimize images and assets for each density bucket
- Use vector drawables when possible
- Minimize over-drawing and layer count
- Simplify animations and transitions on low-end devices
- Test scrolling performance with realistic content volumes
Resources for Further Learning
Official Documentation
- Material Design Guidelines
- Android Developers Design Guidelines
- Material Components for Android
- Material Design Components Tool