@musashishao/agent-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @musashishao/agent-kit might be problematic. Click here for more details.
- package/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/search.py +76 -0
- package/.agent/ARCHITECTURE.md +225 -0
- package/.agent/CONTEXT.md +229 -0
- package/.agent/FEATURE_ROADMAP.md +435 -0
- package/.agent/PROMPT_TEMPLATES.md +261 -0
- package/.agent/agents/backend-specialist.md +263 -0
- package/.agent/agents/database-architect.md +226 -0
- package/.agent/agents/debugger.md +225 -0
- package/.agent/agents/devops-engineer.md +242 -0
- package/.agent/agents/documentation-writer.md +104 -0
- package/.agent/agents/explorer-agent.md +73 -0
- package/.agent/agents/frontend-specialist.md +556 -0
- package/.agent/agents/game-developer.md +162 -0
- package/.agent/agents/mobile-developer.md +377 -0
- package/.agent/agents/orchestrator.md +416 -0
- package/.agent/agents/penetration-tester.md +188 -0
- package/.agent/agents/performance-optimizer.md +187 -0
- package/.agent/agents/project-planner.md +403 -0
- package/.agent/agents/security-auditor.md +170 -0
- package/.agent/agents/seo-specialist.md +111 -0
- package/.agent/agents/test-engineer.md +158 -0
- package/.agent/rules/GEMINI.md +251 -0
- package/.agent/skills/api-patterns/SKILL.md +81 -0
- package/.agent/skills/api-patterns/api-style.md +42 -0
- package/.agent/skills/api-patterns/auth.md +24 -0
- package/.agent/skills/api-patterns/documentation.md +26 -0
- package/.agent/skills/api-patterns/graphql.md +41 -0
- package/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/.agent/skills/api-patterns/response.md +37 -0
- package/.agent/skills/api-patterns/rest.md +40 -0
- package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.agent/skills/api-patterns/security-testing.md +122 -0
- package/.agent/skills/api-patterns/trpc.md +41 -0
- package/.agent/skills/api-patterns/versioning.md +22 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +40 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/.agent/skills/architecture/SKILL.md +55 -0
- package/.agent/skills/architecture/context-discovery.md +43 -0
- package/.agent/skills/architecture/examples.md +94 -0
- package/.agent/skills/architecture/pattern-selection.md +68 -0
- package/.agent/skills/architecture/patterns-reference.md +50 -0
- package/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/.agent/skills/bash-linux/SKILL.md +199 -0
- package/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/.agent/skills/brainstorming/SKILL.md +163 -0
- package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/.agent/skills/clean-code/SKILL.md +201 -0
- package/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/.agent/skills/database-design/SKILL.md +52 -0
- package/.agent/skills/database-design/database-selection.md +43 -0
- package/.agent/skills/database-design/indexing.md +39 -0
- package/.agent/skills/database-design/migrations.md +48 -0
- package/.agent/skills/database-design/optimization.md +36 -0
- package/.agent/skills/database-design/orm-selection.md +30 -0
- package/.agent/skills/database-design/schema-design.md +56 -0
- package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/.agent/skills/doc.md +177 -0
- package/.agent/skills/docker-expert/SKILL.md +409 -0
- package/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/.agent/skills/frontend-design/SKILL.md +396 -0
- package/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/.agent/skills/frontend-design/color-system.md +311 -0
- package/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/.agent/skills/frontend-design/typography-system.md +345 -0
- package/.agent/skills/frontend-design/ux-psychology.md +541 -0
- package/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/.agent/skills/game-development/SKILL.md +167 -0
- package/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/.agent/skills/mobile-design/SKILL.md +394 -0
- package/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/.agent/skills/mobile-design/platform-android.md +666 -0
- package/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/.agent/skills/nestjs-expert/SKILL.md +552 -0
- package/.agent/skills/nextjs-best-practices/SKILL.md +203 -0
- package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/.agent/skills/plan-writing/SKILL.md +152 -0
- package/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/.agent/skills/prisma-expert/SKILL.md +355 -0
- package/.agent/skills/python-patterns/SKILL.md +441 -0
- package/.agent/skills/react-patterns/SKILL.md +198 -0
- package/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/.agent/skills/server-management/SKILL.md +161 -0
- package/.agent/skills/systematic-debugging/SKILL.md +109 -0
- package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/.agent/skills/tdd-workflow/SKILL.md +149 -0
- package/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/.agent/skills/typescript-expert/SKILL.md +429 -0
- package/.agent/skills/typescript-expert/references/tsconfig-strict.json +92 -0
- package/.agent/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/.agent/skills/typescript-expert/references/utility-types.ts +335 -0
- package/.agent/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +351 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +257 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +76 -0
- package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/.agent/workflows/brainstorm.md +113 -0
- package/.agent/workflows/create.md +59 -0
- package/.agent/workflows/debug.md +103 -0
- package/.agent/workflows/deploy.md +176 -0
- package/.agent/workflows/enhance.md +63 -0
- package/.agent/workflows/orchestrate.md +237 -0
- package/.agent/workflows/plan.md +89 -0
- package/.agent/workflows/preview.md +80 -0
- package/.agent/workflows/status.md +86 -0
- package/.agent/workflows/test.md +144 -0
- package/.agent/workflows/ui-ux-pro-max.md +231 -0
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/bin/cli.js +235 -0
- package/index.js +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
# Android Platform Guidelines
|
|
2
|
+
|
|
3
|
+
> Material Design 3 essentials, Android design conventions, Roboto typography, and native patterns.
|
|
4
|
+
> **Read this file when building for Android devices.**
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Material Design 3 Philosophy
|
|
9
|
+
|
|
10
|
+
### Core Material Principles
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
MATERIAL AS METAPHOR:
|
|
14
|
+
├── Surfaces exist in 3D space
|
|
15
|
+
├── Light and shadow define hierarchy
|
|
16
|
+
├── Motion provides continuity
|
|
17
|
+
└── Bold, graphic, intentional design
|
|
18
|
+
|
|
19
|
+
ADAPTIVE DESIGN:
|
|
20
|
+
├── Responds to device capabilities
|
|
21
|
+
├── One UI for all form factors
|
|
22
|
+
├── Dynamic color from wallpaper
|
|
23
|
+
└── Personalized per user
|
|
24
|
+
|
|
25
|
+
ACCESSIBLE BY DEFAULT:
|
|
26
|
+
├── Large touch targets
|
|
27
|
+
├── Clear visual hierarchy
|
|
28
|
+
├── Semantic colors
|
|
29
|
+
└── Motion respects preferences
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Material Design Values
|
|
33
|
+
|
|
34
|
+
| Value | Implementation |
|
|
35
|
+
|-------|----------------|
|
|
36
|
+
| **Dynamic Color** | Colors adapt to wallpaper/user preference |
|
|
37
|
+
| **Personalization** | User-specific themes |
|
|
38
|
+
| **Accessibility** | Built into every component |
|
|
39
|
+
| **Responsiveness** | Works on all screen sizes |
|
|
40
|
+
| **Consistency** | Unified design language |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 2. Android Typography
|
|
45
|
+
|
|
46
|
+
### Roboto Font Family
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Android System Fonts:
|
|
50
|
+
├── Roboto: Default sans-serif
|
|
51
|
+
├── Roboto Flex: Variable font (API 33+)
|
|
52
|
+
├── Roboto Serif: Serif alternative
|
|
53
|
+
├── Roboto Mono: Monospace
|
|
54
|
+
└── Google Sans: Google products (special license)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Material Type Scale
|
|
58
|
+
|
|
59
|
+
| Role | Size | Weight | Line Height | Usage |
|
|
60
|
+
|------|------|--------|-------------|-------|
|
|
61
|
+
| **Display Large** | 57sp | Regular | 64sp | Hero text, splash |
|
|
62
|
+
| **Display Medium** | 45sp | Regular | 52sp | Large headers |
|
|
63
|
+
| **Display Small** | 36sp | Regular | 44sp | Medium headers |
|
|
64
|
+
| **Headline Large** | 32sp | Regular | 40sp | Page titles |
|
|
65
|
+
| **Headline Medium** | 28sp | Regular | 36sp | Section headers |
|
|
66
|
+
| **Headline Small** | 24sp | Regular | 32sp | Subsections |
|
|
67
|
+
| **Title Large** | 22sp | Regular | 28sp | Dialogs, cards |
|
|
68
|
+
| **Title Medium** | 16sp | Medium | 24sp | Lists, navigation |
|
|
69
|
+
| **Title Small** | 14sp | Medium | 20sp | Tabs, secondary |
|
|
70
|
+
| **Body Large** | 16sp | Regular | 24sp | Primary content |
|
|
71
|
+
| **Body Medium** | 14sp | Regular | 20sp | Secondary content |
|
|
72
|
+
| **Body Small** | 12sp | Regular | 16sp | Captions |
|
|
73
|
+
| **Label Large** | 14sp | Medium | 20sp | Buttons, FAB |
|
|
74
|
+
| **Label Medium** | 12sp | Medium | 16sp | Navigation |
|
|
75
|
+
| **Label Small** | 11sp | Medium | 16sp | Chips, badges |
|
|
76
|
+
|
|
77
|
+
### Scalable Pixels (sp)
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
sp = Scale-independent pixels
|
|
81
|
+
|
|
82
|
+
sp automatically scales with:
|
|
83
|
+
├── User font size preference
|
|
84
|
+
├── Display density
|
|
85
|
+
└── Accessibility settings
|
|
86
|
+
|
|
87
|
+
RULE: ALWAYS use sp for text, dp for everything else.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Font Weight Usage
|
|
91
|
+
|
|
92
|
+
| Weight | Use Case |
|
|
93
|
+
|--------|----------|
|
|
94
|
+
| Regular (400) | Body text, display |
|
|
95
|
+
| Medium (500) | Buttons, labels, emphasis |
|
|
96
|
+
| Bold (700) | Rarely, strong emphasis only |
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 3. Material Color System
|
|
101
|
+
|
|
102
|
+
### Dynamic Color (Material You)
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Android 12+ Dynamic Color:
|
|
106
|
+
|
|
107
|
+
User's wallpaper → Color extraction → App theme
|
|
108
|
+
|
|
109
|
+
Your app automatically adapts to:
|
|
110
|
+
├── Primary color (from wallpaper)
|
|
111
|
+
├── Secondary color (complementary)
|
|
112
|
+
├── Tertiary color (accent)
|
|
113
|
+
├── Surface colors (derived)
|
|
114
|
+
└── All semantic colors adjust
|
|
115
|
+
|
|
116
|
+
RULE: Implement dynamic color for personalized feel.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Semantic Color Roles
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Surface Colors:
|
|
123
|
+
├── Surface → Main background
|
|
124
|
+
├── SurfaceVariant → Cards, containers
|
|
125
|
+
├── SurfaceTint → Elevation overlay
|
|
126
|
+
├── InverseSurface → Snackbars, tooltips
|
|
127
|
+
|
|
128
|
+
On-Surface Colors:
|
|
129
|
+
├── OnSurface → Primary text
|
|
130
|
+
├── OnSurfaceVariant → Secondary text
|
|
131
|
+
├── Outline → Borders, dividers
|
|
132
|
+
├── OutlineVariant → Subtle dividers
|
|
133
|
+
|
|
134
|
+
Primary Colors:
|
|
135
|
+
├── Primary → Key actions, FAB
|
|
136
|
+
├── OnPrimary → Text on primary
|
|
137
|
+
├── PrimaryContainer → Less emphasis
|
|
138
|
+
├── OnPrimaryContainer → Text on container
|
|
139
|
+
|
|
140
|
+
Secondary/Tertiary: Similar pattern
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Error, Warning, Success Colors
|
|
144
|
+
|
|
145
|
+
| Role | Light | Dark | Usage |
|
|
146
|
+
|------|-------|------|-------|
|
|
147
|
+
| Error | #B3261E | #F2B8B5 | Errors, destructive |
|
|
148
|
+
| OnError | #FFFFFF | #601410 | Text on error |
|
|
149
|
+
| ErrorContainer | #F9DEDC | #8C1D18 | Error backgrounds |
|
|
150
|
+
|
|
151
|
+
### Dark Theme
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
Material Dark Theme:
|
|
155
|
+
|
|
156
|
+
├── Background: #121212 (not pure black by default)
|
|
157
|
+
├── Surface: #1E1E1E, #232323, etc. (elevation)
|
|
158
|
+
├── Elevation: Higher = lighter overlay
|
|
159
|
+
├── Reduce saturation on colors
|
|
160
|
+
└── Check contrast ratios
|
|
161
|
+
|
|
162
|
+
Elevation overlays (dark mode):
|
|
163
|
+
├── 0dp → 0% overlay
|
|
164
|
+
├── 1dp → 5% overlay
|
|
165
|
+
├── 3dp → 8% overlay
|
|
166
|
+
├── 6dp → 11% overlay
|
|
167
|
+
├── 8dp → 12% overlay
|
|
168
|
+
├── 12dp → 14% overlay
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## 4. Android Layout & Spacing
|
|
174
|
+
|
|
175
|
+
### Layout Grid
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Android uses 8dp baseline grid:
|
|
179
|
+
|
|
180
|
+
All spacing in multiples of 8dp:
|
|
181
|
+
├── 4dp: Component internal (half-step)
|
|
182
|
+
├── 8dp: Minimum spacing
|
|
183
|
+
├── 16dp: Standard spacing
|
|
184
|
+
├── 24dp: Section spacing
|
|
185
|
+
├── 32dp: Large spacing
|
|
186
|
+
|
|
187
|
+
Margins:
|
|
188
|
+
├── Compact (phone): 16dp
|
|
189
|
+
├── Medium (small tablet): 24dp
|
|
190
|
+
├── Expanded (large): 24dp+ or columns
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Responsive Layout
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Window Size Classes:
|
|
197
|
+
|
|
198
|
+
COMPACT (< 600dp width):
|
|
199
|
+
├── Phones in portrait
|
|
200
|
+
├── Single column layout
|
|
201
|
+
├── Bottom navigation
|
|
202
|
+
|
|
203
|
+
MEDIUM (600-840dp width):
|
|
204
|
+
├── Tablets, foldables
|
|
205
|
+
├── Consider 2 columns
|
|
206
|
+
├── Navigation rail option
|
|
207
|
+
|
|
208
|
+
EXPANDED (> 840dp width):
|
|
209
|
+
├── Large tablets, desktop
|
|
210
|
+
├── Multi-column layouts
|
|
211
|
+
├── Navigation drawer
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Canonical Layouts
|
|
215
|
+
|
|
216
|
+
| Layout | Use Case | Window Class |
|
|
217
|
+
|--------|----------|--------------|
|
|
218
|
+
| **List-Detail** | Email, messages | Medium, Expanded |
|
|
219
|
+
| **Feed** | Social, news | All |
|
|
220
|
+
| **Supporting Pane** | Reference content | Medium, Expanded |
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 5. Android Navigation Patterns
|
|
225
|
+
|
|
226
|
+
### Navigation Components
|
|
227
|
+
|
|
228
|
+
| Component | Use Case | Position |
|
|
229
|
+
|-----------|----------|----------|
|
|
230
|
+
| **Bottom Navigation** | 3-5 top-level destinations | Bottom |
|
|
231
|
+
| **Navigation Rail** | Tablets, foldables | Left side, vertical |
|
|
232
|
+
| **Navigation Drawer** | Many destinations, large screens | Left side, hidden/visible |
|
|
233
|
+
| **Top App Bar** | Current context, actions | Top |
|
|
234
|
+
|
|
235
|
+
### Bottom Navigation
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
┌─────────────────────────────────────┐
|
|
239
|
+
│ │
|
|
240
|
+
│ Content Area │
|
|
241
|
+
│ │
|
|
242
|
+
├─────────────────────────────────────┤
|
|
243
|
+
│ 🏠 🔍 ➕ ❤️ 👤 │ ← 80dp height
|
|
244
|
+
│ Home Search FAB Saved Profile│
|
|
245
|
+
└─────────────────────────────────────┘
|
|
246
|
+
|
|
247
|
+
Rules:
|
|
248
|
+
├── 3-5 destinations
|
|
249
|
+
├── Icons: Material Symbols (24dp)
|
|
250
|
+
├── Labels: Always visible (accessibility)
|
|
251
|
+
├── Active: Filled icon + indicator pill
|
|
252
|
+
├── Badge: For notifications
|
|
253
|
+
├── FAB can integrate (optional)
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Top App Bar
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
Types:
|
|
260
|
+
├── Center-aligned: Logo apps, simple
|
|
261
|
+
├── Small: Compact, scrolls away
|
|
262
|
+
├── Medium: Title + actions, collapses
|
|
263
|
+
├── Large: Display title, collapses to small
|
|
264
|
+
|
|
265
|
+
┌─────────────────────────────────────┐
|
|
266
|
+
│ ☰ App Title 🔔 ⋮ │ ← 64dp (small)
|
|
267
|
+
├─────────────────────────────────────┤
|
|
268
|
+
│ │
|
|
269
|
+
│ Content Area │
|
|
270
|
+
└─────────────────────────────────────┘
|
|
271
|
+
|
|
272
|
+
Actions: Max 3 icons, overflow menu ( ⋮ ) for more
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Navigation Rail (Tablets)
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
┌───────┬─────────────────────────────┐
|
|
279
|
+
│ ≡ │ │
|
|
280
|
+
│ │ │
|
|
281
|
+
│ 🏠 │ │
|
|
282
|
+
│ Home │ Content Area │
|
|
283
|
+
│ │ │
|
|
284
|
+
│ 🔍 │ │
|
|
285
|
+
│Search │ │
|
|
286
|
+
│ │ │
|
|
287
|
+
│ 👤 │ │
|
|
288
|
+
│Profile│ │
|
|
289
|
+
└───────┴─────────────────────────────┘
|
|
290
|
+
|
|
291
|
+
Width: 80dp
|
|
292
|
+
Icons: 24dp
|
|
293
|
+
Labels: Below icon
|
|
294
|
+
FAB: Can be at top
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Back Navigation
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
Android provides system back:
|
|
301
|
+
├── Back button (3-button nav)
|
|
302
|
+
├── Back gesture (swipe from edge)
|
|
303
|
+
├── Predictive back (Android 14+)
|
|
304
|
+
|
|
305
|
+
Your app must:
|
|
306
|
+
├── Handle back correctly (pop stack)
|
|
307
|
+
├── Support predictive back animation
|
|
308
|
+
├── Never hijack/override back unexpectedly
|
|
309
|
+
└── Confirm before discarding unsaved work
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## 6. Material Components
|
|
315
|
+
|
|
316
|
+
### Buttons
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
Button Types:
|
|
320
|
+
|
|
321
|
+
┌──────────────────────┐
|
|
322
|
+
│ Filled Button │ ← Primary action
|
|
323
|
+
└──────────────────────┘
|
|
324
|
+
|
|
325
|
+
┌──────────────────────┐
|
|
326
|
+
│ Tonal Button │ ← Secondary, less emphasis
|
|
327
|
+
└──────────────────────┘
|
|
328
|
+
|
|
329
|
+
┌──────────────────────┐
|
|
330
|
+
│ Outlined Button │ ← Tertiary, lower emphasis
|
|
331
|
+
└──────────────────────┘
|
|
332
|
+
|
|
333
|
+
Text Button ← Lowest emphasis
|
|
334
|
+
|
|
335
|
+
Heights:
|
|
336
|
+
├── Small: 40dp (when constrained)
|
|
337
|
+
├── Standard: 40dp
|
|
338
|
+
├── Large: 56dp (FAB size when needed)
|
|
339
|
+
|
|
340
|
+
Min touch target: 48dp (even if visual is smaller)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Floating Action Button (FAB)
|
|
344
|
+
|
|
345
|
+
```
|
|
346
|
+
FAB Types:
|
|
347
|
+
├── Standard: 56dp diameter
|
|
348
|
+
├── Small: 40dp diameter
|
|
349
|
+
├── Large: 96dp diameter
|
|
350
|
+
├── Extended: Icon + text, variable width
|
|
351
|
+
|
|
352
|
+
Position: Bottom right, 16dp from edges
|
|
353
|
+
Elevation: Floats above content
|
|
354
|
+
|
|
355
|
+
┌─────────────────────────────────────┐
|
|
356
|
+
│ │
|
|
357
|
+
│ Content │
|
|
358
|
+
│ │
|
|
359
|
+
│ ┌────┐ │
|
|
360
|
+
│ │ ➕ │ │ ← FAB
|
|
361
|
+
│ └────┘ │
|
|
362
|
+
├─────────────────────────────────────┤
|
|
363
|
+
│ Bottom Navigation │
|
|
364
|
+
└─────────────────────────────────────┘
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Cards
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
Card Types:
|
|
371
|
+
├── Elevated: Shadow, resting state
|
|
372
|
+
├── Filled: Background color, no shadow
|
|
373
|
+
├── Outlined: Border, no shadow
|
|
374
|
+
|
|
375
|
+
Card Anatomy:
|
|
376
|
+
┌─────────────────────────────────────┐
|
|
377
|
+
│ Header Image │ ← Optional
|
|
378
|
+
├─────────────────────────────────────┤
|
|
379
|
+
│ Title / Headline │
|
|
380
|
+
│ Subhead / Supporting text │
|
|
381
|
+
├─────────────────────────────────────┤
|
|
382
|
+
│ [ Action ] [ Action ] │ ← Optional actions
|
|
383
|
+
└─────────────────────────────────────┘
|
|
384
|
+
|
|
385
|
+
Corner radius: 12dp (M3 default)
|
|
386
|
+
Padding: 16dp
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Text Fields
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
Types:
|
|
393
|
+
├── Filled: Background fill, underline
|
|
394
|
+
├── Outlined: Border all around
|
|
395
|
+
|
|
396
|
+
┌─────────────────────────────────────┐
|
|
397
|
+
│ Label │ ← Floats up on focus
|
|
398
|
+
│ ________________________________________________
|
|
399
|
+
│ │ Input text here... │ ← Leading/trailing icons
|
|
400
|
+
│ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
|
401
|
+
│ Supporting text or error │
|
|
402
|
+
└─────────────────────────────────────┘
|
|
403
|
+
|
|
404
|
+
Height: 56dp
|
|
405
|
+
Label: Animates from placeholder to top
|
|
406
|
+
Error: Red color + icon + message
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Chips
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
Types:
|
|
413
|
+
├── Assist: Smart actions (directions, call)
|
|
414
|
+
├── Filter: Toggle filters
|
|
415
|
+
├── Input: Represent entities (tags, contacts)
|
|
416
|
+
├── Suggestion: Dynamic recommendations
|
|
417
|
+
|
|
418
|
+
┌───────────────┐
|
|
419
|
+
│ 🏷️ Filter │ ← 32dp height, 8dp corner radius
|
|
420
|
+
└───────────────┘
|
|
421
|
+
|
|
422
|
+
States: Unselected, Selected, Disabled
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## 7. Android-Specific Patterns
|
|
428
|
+
|
|
429
|
+
### Snackbars
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
Position: Bottom, above navigation
|
|
433
|
+
Duration: 4-10 seconds
|
|
434
|
+
Action: One optional text action
|
|
435
|
+
|
|
436
|
+
┌─────────────────────────────────────────────────┐
|
|
437
|
+
│ Archived 1 item [ UNDO ] │
|
|
438
|
+
└─────────────────────────────────────────────────┘
|
|
439
|
+
|
|
440
|
+
Rules:
|
|
441
|
+
├── Brief message, single line if possible
|
|
442
|
+
├── Max 2 lines
|
|
443
|
+
├── One action (text, not icon)
|
|
444
|
+
├── Can be dismissed by swipe
|
|
445
|
+
└── Don't stack, queue them
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
### Bottom Sheets
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
Types:
|
|
452
|
+
├── Standard: Interactive content
|
|
453
|
+
├── Modal: Blocks background (with scrim)
|
|
454
|
+
|
|
455
|
+
Modal Bottom Sheet:
|
|
456
|
+
┌─────────────────────────────────────┐
|
|
457
|
+
│ │
|
|
458
|
+
│ (Scrim over content) │
|
|
459
|
+
│ │
|
|
460
|
+
├═════════════════════════════════════┤
|
|
461
|
+
│ ───── (Drag handle, optional) │
|
|
462
|
+
│ │
|
|
463
|
+
│ Sheet Content │
|
|
464
|
+
│ │
|
|
465
|
+
│ Actions / Options │
|
|
466
|
+
│ │
|
|
467
|
+
└─────────────────────────────────────┘
|
|
468
|
+
|
|
469
|
+
Corner radius: 28dp (top corners)
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
### Dialogs
|
|
473
|
+
|
|
474
|
+
```
|
|
475
|
+
Types:
|
|
476
|
+
├── Basic: Title + content + actions
|
|
477
|
+
├── Full-screen: Complex editing (mobile)
|
|
478
|
+
├── Date/Time picker
|
|
479
|
+
├── Confirmation dialog
|
|
480
|
+
|
|
481
|
+
┌─────────────────────────────────────┐
|
|
482
|
+
│ Title │
|
|
483
|
+
│ │
|
|
484
|
+
│ Supporting text that │
|
|
485
|
+
│ explains the dialog │
|
|
486
|
+
│ │
|
|
487
|
+
│ [ Cancel ] [ Confirm ] │
|
|
488
|
+
└─────────────────────────────────────┘
|
|
489
|
+
|
|
490
|
+
Rules:
|
|
491
|
+
├── Centered on screen
|
|
492
|
+
├── Scrim behind (dim background)
|
|
493
|
+
├── Max 2 actions aligned right
|
|
494
|
+
├── Destructive action can be on left
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
### Pull to Refresh
|
|
498
|
+
|
|
499
|
+
```
|
|
500
|
+
Android uses SwipeRefreshLayout pattern:
|
|
501
|
+
|
|
502
|
+
┌─────────────────────────────────────┐
|
|
503
|
+
│ ○ (Spinner) │ ← Circular progress
|
|
504
|
+
├─────────────────────────────────────┤
|
|
505
|
+
│ │
|
|
506
|
+
│ Content │
|
|
507
|
+
│ │
|
|
508
|
+
└─────────────────────────────────────┘
|
|
509
|
+
|
|
510
|
+
Spinner: Material circular indicator
|
|
511
|
+
Position: Top center, pulls down with content
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
### Ripple Effect
|
|
515
|
+
|
|
516
|
+
```
|
|
517
|
+
Every touchable element needs ripple:
|
|
518
|
+
|
|
519
|
+
Touch down → Ripple expands from touch point
|
|
520
|
+
Touch up → Ripple completes and fades
|
|
521
|
+
|
|
522
|
+
Color:
|
|
523
|
+
├── On light: Black at ~12% opacity
|
|
524
|
+
├── On dark: White at ~12% opacity
|
|
525
|
+
├── On colored: Appropriate contrast
|
|
526
|
+
|
|
527
|
+
This is MANDATORY for Android feel.
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
## 8. Material Symbols
|
|
533
|
+
|
|
534
|
+
### Usage Guidelines
|
|
535
|
+
|
|
536
|
+
```
|
|
537
|
+
Material Symbols: Google's icon library
|
|
538
|
+
|
|
539
|
+
Styles:
|
|
540
|
+
├── Outlined: Default, most common
|
|
541
|
+
├── Rounded: Softer, friendly
|
|
542
|
+
├── Sharp: Angular, precise
|
|
543
|
+
|
|
544
|
+
Variable font axes:
|
|
545
|
+
├── FILL: 0 (outline) to 1 (filled)
|
|
546
|
+
├── wght: 100-700 (weight)
|
|
547
|
+
├── GRAD: -25 to 200 (emphasis)
|
|
548
|
+
├── opsz: 20, 24, 40, 48 (optical size)
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### Icon Sizes
|
|
552
|
+
|
|
553
|
+
| Size | Usage |
|
|
554
|
+
|------|-------|
|
|
555
|
+
| 20dp | Dense UI, inline |
|
|
556
|
+
| 24dp | Standard (most common) |
|
|
557
|
+
| 40dp | Larger touch targets |
|
|
558
|
+
| 48dp | Emphasis, standalone |
|
|
559
|
+
|
|
560
|
+
### States
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
Icon States:
|
|
564
|
+
├── Default: Full opacity
|
|
565
|
+
├── Disabled: 38% opacity
|
|
566
|
+
├── Hover/Focus: Container highlight
|
|
567
|
+
├── Selected: Filled variant + tint
|
|
568
|
+
|
|
569
|
+
Active vs Inactive:
|
|
570
|
+
├── Inactive: Outlined
|
|
571
|
+
├── Active: Filled + indicator
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
## 9. Android Accessibility
|
|
577
|
+
|
|
578
|
+
### TalkBack Requirements
|
|
579
|
+
|
|
580
|
+
```
|
|
581
|
+
Every interactive element needs:
|
|
582
|
+
├── contentDescription (what it is)
|
|
583
|
+
├── Correct semantics (button, checkbox, etc.)
|
|
584
|
+
├── State announcements (selected, disabled)
|
|
585
|
+
└── Grouping where logical
|
|
586
|
+
|
|
587
|
+
Jetpack Compose:
|
|
588
|
+
Modifier.semantics {
|
|
589
|
+
contentDescription = "Play button"
|
|
590
|
+
role = Role.Button
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
React Native:
|
|
594
|
+
accessibilityLabel="Play button"
|
|
595
|
+
accessibilityRole="button"
|
|
596
|
+
accessibilityState={{ disabled: false }}
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### Touch Target Size
|
|
600
|
+
|
|
601
|
+
```
|
|
602
|
+
MANDATORY: 48dp × 48dp minimum
|
|
603
|
+
|
|
604
|
+
Even if visual element is smaller:
|
|
605
|
+
├── Icon: 24dp visual, 48dp touch area
|
|
606
|
+
├── Checkbox: 20dp visual, 48dp touch area
|
|
607
|
+
└── Add padding to reach 48dp
|
|
608
|
+
|
|
609
|
+
Spacing between targets: 8dp minimum
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
### Font Scaling
|
|
613
|
+
|
|
614
|
+
```
|
|
615
|
+
Android supports font scaling:
|
|
616
|
+
├── 85% (smaller)
|
|
617
|
+
├── 100% (default)
|
|
618
|
+
├── 115%, 130%, 145%...
|
|
619
|
+
├── Up to 200% (largest)
|
|
620
|
+
|
|
621
|
+
RULE: Test your UI at 200% font scale.
|
|
622
|
+
Use sp units and avoid fixed heights.
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### Reduce Motion
|
|
626
|
+
|
|
627
|
+
```kotlin
|
|
628
|
+
// Check motion preference
|
|
629
|
+
val reduceMotion = Settings.Global.getFloat(
|
|
630
|
+
contentResolver,
|
|
631
|
+
Settings.Global.ANIMATOR_DURATION_SCALE,
|
|
632
|
+
1f
|
|
633
|
+
) == 0f
|
|
634
|
+
|
|
635
|
+
if (reduceMotion) {
|
|
636
|
+
// Skip or reduce animations
|
|
637
|
+
}
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
## 10. Android Checklist
|
|
643
|
+
|
|
644
|
+
### Before Every Android Screen
|
|
645
|
+
|
|
646
|
+
- [ ] Using Material 3 components
|
|
647
|
+
- [ ] Touch targets ≥ 48dp
|
|
648
|
+
- [ ] Ripple effect on all touchables
|
|
649
|
+
- [ ] Roboto or Material type scale
|
|
650
|
+
- [ ] Semantic colors (dynamic color support)
|
|
651
|
+
- [ ] Back navigation works correctly
|
|
652
|
+
|
|
653
|
+
### Before Android Release
|
|
654
|
+
|
|
655
|
+
- [ ] Dark theme tested
|
|
656
|
+
- [ ] Dynamic color tested (if supported)
|
|
657
|
+
- [ ] All font sizes tested (200% scale)
|
|
658
|
+
- [ ] TalkBack tested
|
|
659
|
+
- [ ] Predictive back implemented (Android 14+)
|
|
660
|
+
- [ ] Edge-to-edge display (Android 15+)
|
|
661
|
+
- [ ] Different screen sizes tested (phones, tablets)
|
|
662
|
+
- [ ] Navigation patterns match platform (back, gestures)
|
|
663
|
+
|
|
664
|
+
---
|
|
665
|
+
|
|
666
|
+
> **Remember:** Android users expect Material Design. Custom designs that ignore Material patterns feel foreign and broken. Use Material components as your foundation, customize thoughtfully.
|