| created | "2025-12-30T00:00:00.000Z" |
| modified | "2025-12-30T00:00:00.000Z" |
| reviewed | "2025-12-30T00:00:00.000Z" |
| name | android-layout-audit |
| description | Audit Android app layouts for Material Design 3 compliance, accessibility, edge-to-edge support, and modern best practices. Use for layout reviews, pre-release checks, or establishing baseline quality. |
| allowed-tools | Bash, Read, Grep, Glob, TodoWrite, Task, WebSearch |
Android Layout Audit
Expert knowledge for auditing Android app layouts against Material Design 3 guidelines, accessibility requirements, and modern Android platform conventions.
Audit Categories
1. Touch Target Size (Accessibility)
Requirement: All interactive elements must be at least 48dp × 48dp.
Check CSS/Styles for:
min-height: 48px;
min-width: 48px;
padding:
Common Issues:
- Buttons with only padding, no min-height/min-width
- Icon buttons without sufficient touch area
- Close/dismiss buttons that are too small
Patterns to Search:
rg -i "button|btn|clickable|tap|touch" --type css
rg "min-height|min-width|padding" --type css
rg "onclick|@click|on:click" --type svelte --type vue --type html
2. Color Contrast (Accessibility)
Requirements:
| Content Type | Minimum Ratio |
|---|
| Body text (< 18pt or < 14pt bold) | 4.5:1 |
| Large text (≥ 18pt or ≥ 14pt bold) | 3:1 |
| UI components & graphics | 3:1 |
Common Colors to Check:
color: #888;
color: #666;
color: #4ade80;
color: #fbbf24;
color: #ef4444;
Tools:
3. Edge-to-Edge Display (Android 15+)
Requirement: Apps targeting SDK 35+ must handle edge-to-edge display.
CSS Properties to Use:
padding-bottom: env(safe-area-inset-bottom);
padding-top: env(safe-area-inset-top);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
padding: env(safe-area-inset-top) env(safe-area-inset-right)
env(safe-area-inset-bottom) env(safe-area-inset-left);
Common Issues:
- Content hidden behind navigation bar
- Interactive elements in gesture navigation zones
- Status bar overlapping content
Patterns to Search:
rg "safe-area-inset" --type css
rg "env\(safe-area"
rg "viewport-fit=cover" --type html
4. Spacing System (8dp Grid)
Requirement: Use multiples of 8dp for consistent spacing.
Valid Values:
- 4dp (half-unit, use sparingly)
- 8dp, 16dp, 24dp, 32dp, 40dp, 48dp, 56dp, 64dp
Invalid Values to Flag:
padding: 5px;
margin: 12px;
gap: 10px;
padding: 15px;
Patterns to Search:
rg ":\s*(5|7|9|10|11|13|14|15|17|18|19|21|22|23|25|26|27)px" --type css
rg ":\s*(5|7|9|10|11|13|14|15|17|18|19|21|22|23|25|26|27)dp" --type css
5. Typography Scale
Material Design 3 Type Scale:
| Style | Size | Line Height | Weight |
|---|
| Display Large | 57sp | 64sp | 400 |
| Display Medium | 45sp | 52sp | 400 |
| Display Small | 36sp | 44sp | 400 |
| Headline Large | 32sp | 40sp | 400 |
| Headline Medium | 28sp | 36sp | 400 |
| Headline Small | 24sp | 32sp | 400 |
| Title Large | 22sp | 28sp | 400 |
| Title Medium | 16sp | 24sp | 500 |
| Title Small | 14sp | 20sp | 500 |
| Body Large | 16sp | 24sp | 400 |
| Body Medium | 14sp | 20sp | 400 |
| Body Small | 12sp | 16sp | 400 |
| Label Large | 14sp | 20sp | 500 |
| Label Medium | 12sp | 16sp | 500 |
| Label Small | 11sp | 16sp | 500 |
Minimum Readable Size: 12sp (never smaller for body text)
6. Animation Timing
Material Design Motion:
| Duration | Use Case |
|---|
| 100ms | Minimum (avoid, feels abrupt) |
| 200ms | Standard micro-interactions |
| 300ms | Standard transitions |
| 400ms | Complex animations |
| 500ms+ | Large surface changes |
Recommended Easing:
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
7. Responsive/Adaptive Layout
Window Size Classes:
| Class | Width | Typical Devices |
|---|
| Compact | < 600dp | Phones portrait |
| Medium | 600-839dp | Tablets portrait, foldables |
| Expanded | ≥ 840dp | Tablets landscape, desktop |
Navigation Patterns by Size:
| Size Class | Navigation Pattern |
|---|
| Compact | Bottom navigation bar |
| Medium | Navigation rail |
| Expanded | Navigation drawer |
8. Content Descriptions (A11y)
Requirements:
- All non-decorative images need
alt or aria-label
- Interactive elements need accessible names
- Don't include element type in description ("Submit" not "Submit button")
- Unique descriptions for list items
Patterns to Search:
rg "<img[^>]*(?!alt=)" --type html --type svelte --type vue
rg "src=\"[^\"]+\"[^>]*>" --type html
rg "<svg" --type svelte --type vue --type html
rg "<button[^>]*>" --type html --type svelte --type vue
9. Viewport Configuration
Required Meta Tag:
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
Key Properties:
width=device-width - Responsive width
initial-scale=1.0 - No initial zoom
viewport-fit=cover - Edge-to-edge support
user-scalable=yes - Accessibility (don't disable zoom)
10. Aspect Ratio Handling
Common Camera Aspect Ratios:
| Ratio | Resolution Examples | Use Case |
|---|
| 4:3 | 1920×1440, 640×480 | Endoscopes, webcams |
| 16:9 | 1920×1080, 1280×720 | HD video |
| 1:1 | 1080×1080 | Square format |
CSS for Aspect Ratio:
aspect-ratio: 4 / 3;
.container {
position: relative;
padding-bottom: 75%;
}
.container > * {
position: absolute;
inset: 0;
}
Audit Checklist
Critical (Must Fix)
High Priority
Medium Priority
Low Priority
CleanScope-Specific Considerations
Video Container
- Aspect Ratio: Endoscope outputs 1920×1440 (4:3)
- Container should maintain aspect ratio without letterboxing
object-fit: contain for video/canvas scaling
Debug Controls
- Touch targets may be smaller for power-user controls
- Consider collapsible/hidden state for casual users
- Ensure adequate spacing when visible
Status Bar
- Must not overlap system status bar
- Consider always-on-display scenarios
- High contrast for outdoor/bright environments
Parallel Audit Strategy
Launch multiple agents for comprehensive analysis:
- CSS Analysis Agent - Check spacing, sizing, colors
- HTML/Template Agent - Check accessibility attributes
- Viewport Agent - Check meta tags, safe areas
- Component Agent - Check interactive element sizing
Integration
This skill works with:
/check:layout command for quick audits
accessibility-plugin:ux-implementation agent for fixes
code-review agent for comprehensive review
Resources