mobileui-os 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.
- package/AGENTS.md +47 -0
- package/CHANGELOG.md +25 -0
- package/README.md +78 -0
- package/bin/cli.mjs +375 -0
- package/knowledge/android/00-apple-to-android-adaption.md +1499 -0
- package/knowledge/android/accessibility.md +333 -0
- package/knowledge/android/components-controls.md +270 -0
- package/knowledge/android/material-design-3.md +174 -0
- package/knowledge/android/navigation-patterns.md +212 -0
- package/knowledge/apple/00-skill-reading-protocol.md +1296 -0
- package/knowledge/apple/Accessibility, Inclusive Design & Human Factors Intelligence.md +735 -0
- package/knowledge/apple/Advanced Interaction Patterns, Gestures, Feedback & State Transitions.md +1140 -0
- package/knowledge/apple/Advanced Navigation, Information Architecture & Wayfinding.md +551 -0
- package/knowledge/apple/Autonomus Ui-UX Improvement Loop.md +611 -0
- package/knowledge/apple/Color, Materials, Contrast, Themes & Visual Depth.md +1351 -0
- package/knowledge/apple/Content, Copy, Microinteractions & UX Communication.md +642 -0
- package/knowledge/apple/Data-Heavy Interfaces, Tables, Lists, Search, Filtering & Large-Scale Content.md +721 -0
- package/knowledge/apple/Design Systems & Component Architecture.md +412 -0
- package/knowledge/apple/Forms, Input, Data Entry & Validation Intelligence.md +705 -0
- package/knowledge/apple/Interaction, State & Edge-Case Engineering.md +491 -0
- package/knowledge/apple/Interaction-behaviour.md +1378 -0
- package/knowledge/apple/Layout Architecture, Responsive Design & Spatial Systems.md +1365 -0
- package/knowledge/apple/MASTER UI-UX ORCHESTRATOR.md +1210 -0
- package/knowledge/apple/Navigation Architecture, Routing, Deep Linking & State Restoration.md +1392 -0
- package/knowledge/apple/Navigation, Information Architecture & Spatial Hierarchy.md +1613 -0
- package/knowledge/apple/Notifications, Permissions, Privacy and Trust.md +1540 -0
- package/knowledge/apple/Patterns-templates-composition.md +647 -0
- package/knowledge/apple/Performance, Perceived Speed, Motion & Rendering Intelligence.md +855 -0
- package/knowledge/apple/Responsive, Adaptive & Cross-Platform UI Intelligence.md +669 -0
- package/knowledge/apple/Responsive, Adaptive, Accessible & Performant UI.md +545 -0
- package/knowledge/apple/Tablet Adaptation & Multi-Device UX.md +1447 -0
- package/knowledge/apple/UI Implementation & Refactoring.md +498 -0
- package/knowledge/apple/UI-UX Decision-Making, Prioritization & Trade-offs.md +533 -0
- package/knowledge/apple/UI-UX Project Lifecycle & Delivery.md +544 -0
- package/knowledge/apple/User Flows & Experience Architecture.md +335 -0
- package/knowledge/apple/Visual Design Systems, Theming, Tokens & Brand Intelligence.md +764 -0
- package/knowledge/apple/Visual QA, Testing & Validation.md +557 -0
- package/knowledge/apple/accessibility-inclusive-interaction.md +1361 -0
- package/knowledge/apple/accessibility.md +2162 -0
- package/knowledge/apple/color.md +1933 -0
- package/knowledge/apple/component-architecture.md +2208 -0
- package/knowledge/apple/components.md +2172 -0
- package/knowledge/apple/design-decision-framework.md +1883 -0
- package/knowledge/apple/design-review-engine.md +2108 -0
- package/knowledge/apple/design-tokens.md +1943 -0
- package/knowledge/apple/designing-for-ios.md +1680 -0
- package/knowledge/apple/gestures, touch behavior, feedback, motion, and micro-interactions.md +1538 -0
- package/knowledge/apple/hig-foundation.md +1806 -0
- package/knowledge/apple/iconography.md +1903 -0
- package/knowledge/apple/interaction-patterns.md +2513 -0
- package/knowledge/apple/interaction.md +2141 -0
- package/knowledge/apple/ios-alerts-confirmations-destructive-actions.md +1342 -0
- package/knowledge/apple/ios-components-and-controls.md +1634 -0
- package/knowledge/apple/ios-components-patterns.md +1343 -0
- package/knowledge/apple/ios-design-system-architecture.md +1520 -0
- package/knowledge/apple/ios-empty-error-offline-states.md +1370 -0
- package/knowledge/apple/ios-empty-loading-error-recovery.md +1674 -0
- package/knowledge/apple/ios-forms-and-input.md +1458 -0
- package/knowledge/apple/ios-forms-input-data-entry.md +1308 -0
- package/knowledge/apple/ios-gestures-and-touch.md +1272 -0
- package/knowledge/apple/ios-lists-collections-and-data-display.md +1735 -0
- package/knowledge/apple/ios-loading-progress-async-states.md +1378 -0
- package/knowledge/apple/ios-materials-and-surfaces.md +1543 -0
- package/knowledge/apple/ios-motion-animation-transitions.md +1178 -0
- package/knowledge/apple/ios-navigation-and-information-architecture.md +1674 -0
- package/knowledge/apple/ios-navigation-user-flows-design-architecture.md +1195 -0
- package/knowledge/apple/ios-search-and-discovery.md +1456 -0
- package/knowledge/apple/ios-search-filtering-discovery.md +1402 -0
- package/knowledge/apple/ios-sheets-modals-popovers.md +1205 -0
- package/knowledge/apple/ios-typography-icons-visual-hierarchy.md +1431 -0
- package/knowledge/apple/layout.md +2331 -0
- package/knowledge/apple/media-centric-content-ui-patterns.md +1470 -0
- package/knowledge/apple/motion, transitions, physics, and animation language.md +1535 -0
- package/knowledge/apple/motion-and-animation.md +1698 -0
- package/knowledge/apple/motion.md +2087 -0
- package/knowledge/apple/navigation.md +2281 -0
- package/knowledge/apple/responsive-adaptive.md +2159 -0
- package/knowledge/apple/screen-architecture.md +2067 -0
- package/knowledge/apple/typography, Content Hierarchy & Readability.md +1411 -0
- package/knowledge/apple/typography.md +1802 -0
- package/knowledge/apple/ui-ux inteligence audit.md +106 -0
- package/knowledge/apple/visual-design-and-premium-ui.md +1555 -0
- package/knowledge/apple/visual-hierarchy-engine.md +1647 -0
- package/knowledge/apple/visual-materials.md +2189 -0
- package/package.json +53 -0
- package/principles/design-principles.md +37 -0
- package/principles/platform-principles.md +25 -0
- package/principles/ux-principles.md +16 -0
- package/references/official-links.md +11 -0
- package/skills/accessibility-engineer/SKILL.md +125 -0
- package/skills/analytics-engineer/SKILL.md +283 -0
- package/skills/animation-engineer/SKILL.md +316 -0
- package/skills/component-designer/SKILL.md +75 -0
- package/skills/component-library-engineer/SKILL.md +140 -0
- package/skills/component-library-ops/SKILL.md +155 -0
- package/skills/design-system/SKILL.md +77 -0
- package/skills/design-token-engineer/SKILL.md +203 -0
- package/skills/design-token-pipeline/SKILL.md +277 -0
- package/skills/device-lab-engineer/SKILL.md +387 -0
- package/skills/forms-engineer/SKILL.md +79 -0
- package/skills/internationalization-engineer/SKILL.md +256 -0
- package/skills/motion-designer/SKILL.md +77 -0
- package/skills/native-data-fetching/SKILL.md +50 -0
- package/skills/navigation-architect/SKILL.md +65 -0
- package/skills/performance-engineer/SKILL.md +250 -0
- package/skills/platform-specialist/SKILL.md +95 -0
- package/skills/pre-release-gate/SKILL.md +75 -0
- package/skills/screen-designer/SKILL.md +117 -0
- package/skills/security-engineer/SKILL.md +375 -0
- package/skills/skills.json +134 -0
- package/skills/testing-auditor/SKILL.md +62 -0
- package/skills/ui-architect/SKILL.md +86 -0
- package/skills/ui-implementer/SKILL.md +188 -0
- package/skills/ux-architect/SKILL.md +49 -0
- package/skills/ux-auditor/SKILL.md +52 -0
- package/skills/visual-auditor/SKILL.md +71 -0
- package/templates/audit-report.md +29 -0
- package/templates/design-tokens.ts +33 -0
- package/templates/screen-spec.md +61 -0
- package/workflows/new-screen.md +17 -0
- package/workflows/pre-release.md +21 -0
- package/workflows/redesign.md +14 -0
- package/workflows/ui-audit.md +22 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Material Design 3 Reference
|
|
2
|
+
|
|
3
|
+
Core Material 3 concepts for Android adaptation. Use as reference, not prescription.
|
|
4
|
+
|
|
5
|
+
## Color System
|
|
6
|
+
|
|
7
|
+
### Dynamic Color (Android 12+)
|
|
8
|
+
- System generates palette from wallpaper
|
|
9
|
+
- Map to semantic tokens: `color.primary`, `color.onPrimary`, `color.surface`, `color.onSurface`, `color.error`, etc.
|
|
10
|
+
- **Do not let dynamic color override brand identity** — opt in selectively
|
|
11
|
+
|
|
12
|
+
### Color Roles (Static)
|
|
13
|
+
| Role | Usage |
|
|
14
|
+
|------|-------|
|
|
15
|
+
| Primary | Brand actions, key components |
|
|
16
|
+
| Secondary | Less prominent actions |
|
|
17
|
+
| Tertiary | Accent, contrasting elements |
|
|
18
|
+
| Error | Errors, destructive actions |
|
|
19
|
+
| Surface | Cards, sheets, dialogs |
|
|
20
|
+
| Background | App background |
|
|
21
|
+
| Outline | Borders, dividers |
|
|
22
|
+
|
|
23
|
+
### Tone-Based Palettes
|
|
24
|
+
- Each role has tones: 0–100 (0=darkest, 100=lightest)
|
|
25
|
+
- `primary/40` = default, `primary/80` = hover, `primary/90` = pressed
|
|
26
|
+
- Dark mode: use higher tones for same roles
|
|
27
|
+
|
|
28
|
+
## Typography Scale
|
|
29
|
+
|
|
30
|
+
| Style | Size | Weight | Line Height | Use |
|
|
31
|
+
|-------|------|--------|-------------|-----|
|
|
32
|
+
| Display Large | 57 | 400 | 64 | Hero |
|
|
33
|
+
| Display Medium | 45 | 400 | 52 | Large titles |
|
|
34
|
+
| Display Small | 36 | 400 | 44 | Section headers |
|
|
35
|
+
| Headline Large | 32 | 400 | 40 | Screen titles |
|
|
36
|
+
| Headline Medium | 28 | 400 | 36 | Section titles |
|
|
37
|
+
| Headline Small | 24 | 400 | 32 | Card titles |
|
|
38
|
+
| Title Large | 22 | 500 | 28 | Emphasis |
|
|
39
|
+
| Title Medium | 16 | 500 | 24 | Labels |
|
|
40
|
+
| Title Small | 14 | 500 | 20 | Small labels |
|
|
41
|
+
| Body Large | 16 | 400 | 24 | Primary text |
|
|
42
|
+
| Body Medium | 14 | 400 | 20 | Secondary text |
|
|
43
|
+
| Body Small | 12 | 400 | 16 | Captions |
|
|
44
|
+
| Label Large | 14 | 500 | 20 | Buttons |
|
|
45
|
+
| Label Medium | 12 | 500 | 16 | Small buttons |
|
|
46
|
+
| Label Small | 11 | 500 | 16 | Overline |
|
|
47
|
+
|
|
48
|
+
**Adapt:** Use product fonts, preserve hierarchy, apply Android line heights.
|
|
49
|
+
|
|
50
|
+
## Shape System
|
|
51
|
+
|
|
52
|
+
| Corner | Radius | Use |
|
|
53
|
+
|--------|--------|-----|
|
|
54
|
+
| Extra Small | 4dp | Chips, small chips |
|
|
55
|
+
| Small | 8dp | Buttons, text fields, chips |
|
|
56
|
+
| Medium | 12dp | Cards, dialogs, menus |
|
|
57
|
+
| Large | 16dp | Large cards, sheets |
|
|
58
|
+
| Extra Large | 24dp | FAB, bottom sheets |
|
|
59
|
+
| Full | 999dp | Pills, avatars |
|
|
60
|
+
|
|
61
|
+
**Adapt:** Map to design tokens `radius.sm`–`radius.xxl`, `radius.pill`.
|
|
62
|
+
|
|
63
|
+
## Elevation (Shadows)
|
|
64
|
+
|
|
65
|
+
| Level | dp | Use |
|
|
66
|
+
|-------|-----|-----|
|
|
67
|
+
| 0 | 0 | Background, flat |
|
|
68
|
+
| 1 | 1 | Cards, raised |
|
|
69
|
+
| 2 | 3 | Floating action button resting |
|
|
70
|
+
| 3 | 6 | Dialogs, bottom sheets |
|
|
71
|
+
| 4 | 8 | Dropdown menus, tooltips |
|
|
72
|
+
| 5 | 12 | Modal bottom sheets, FAB pressed |
|
|
73
|
+
|
|
74
|
+
**Adapt:** Use `elevation.1`–`elevation.5` tokens, not raw dp.
|
|
75
|
+
|
|
76
|
+
## Motion
|
|
77
|
+
|
|
78
|
+
### Durations
|
|
79
|
+
| Type | Duration | Easing |
|
|
80
|
+
|------|----------|--------|
|
|
81
|
+
| Short | 150ms | Standard |
|
|
82
|
+
| Medium | 250ms | Standard |
|
|
83
|
+
| Long | 400ms | Emphasized |
|
|
84
|
+
|
|
85
|
+
### Easing Curves
|
|
86
|
+
- Standard: `cubic-bezier(0.2, 0, 0, 1)` — most transitions
|
|
87
|
+
- Emphasized: `cubic-bezier(0.2, 0, 0, 1)` with overshoot — attention
|
|
88
|
+
- Decelerate: `cubic-bezier(0, 0, 0.2, 1)` — entering
|
|
89
|
+
- Accelerate: `cubic-bezier(0.4, 0, 1, 1)` — exiting
|
|
90
|
+
|
|
91
|
+
## Components Reference
|
|
92
|
+
|
|
93
|
+
### Buttons
|
|
94
|
+
| Variant | Height | Padding | Use |
|
|
95
|
+
|---------|--------|---------|-----|
|
|
96
|
+
| Filled | 40dp | 24dp | Primary action |
|
|
97
|
+
| Filled Tonal | 40dp | 24dp | Secondary action |
|
|
98
|
+
| Outlined | 40dp | 24dp | Tertiary |
|
|
99
|
+
| Text | 40dp | 12dp | Low emphasis |
|
|
100
|
+
| Icon | 40dp | 12dp | Icon only |
|
|
101
|
+
| FAB | 56dp | — | Primary floating |
|
|
102
|
+
| Small FAB | 40dp | — | Secondary floating |
|
|
103
|
+
| Large FAB | 72dp | — | Extended |
|
|
104
|
+
|
|
105
|
+
### Text Fields
|
|
106
|
+
- States: idle, hover, focus, error, disabled, filled
|
|
107
|
+
- Label: floating (Material) or persistent (custom)
|
|
108
|
+
- Helper text: below input, 12sp
|
|
109
|
+
- Character counter: right-aligned
|
|
110
|
+
|
|
111
|
+
### Chips
|
|
112
|
+
| Type | Use |
|
|
113
|
+
|------|-----|
|
|
114
|
+
| Filter | Toggle selection |
|
|
115
|
+
| Input | User input tags |
|
|
116
|
+
| Suggestion | Suggestions |
|
|
117
|
+
| Assist | Related actions |
|
|
118
|
+
|
|
119
|
+
### Navigation
|
|
120
|
+
- **Bottom Navigation**: 3–5 destinations, 56dp height, icons + labels
|
|
121
|
+
- **Navigation Rail**: 72dp width, 24dp icon, labels on hover/focus
|
|
122
|
+
- **Navigation Drawer**: 280–320dp width, modal or permanent
|
|
123
|
+
- **Top App Bar**: 64dp (compact), 128dp (large), scroll behavior
|
|
124
|
+
|
|
125
|
+
### Dialogs
|
|
126
|
+
- Alert: title + message + 2 actions (dismiss + confirm)
|
|
127
|
+
- Full-screen: complex forms, wizards
|
|
128
|
+
- Button order: dismiss (left) → confirm (right)
|
|
129
|
+
|
|
130
|
+
### Bottom Sheets
|
|
131
|
+
| Type | Behavior |
|
|
132
|
+
|------|----------|
|
|
133
|
+
| Modal | Blocks background, swipe to dismiss |
|
|
134
|
+
| Persistent | Coexists with content, expandable |
|
|
135
|
+
| Standard | Half-screen, drag handle |
|
|
136
|
+
|
|
137
|
+
### Lists
|
|
138
|
+
- Single line: 56dp
|
|
139
|
+
- Two line: 72dp
|
|
140
|
+
- Three line: 88dp
|
|
141
|
+
- Avatar: 40dp, 16dp margin
|
|
142
|
+
- Divider: 16dp inset start
|
|
143
|
+
|
|
144
|
+
## Touch Targets
|
|
145
|
+
- **Minimum**: 48×48dp (Material) / 44×48dp (Android)
|
|
146
|
+
- **Recommended**: 56×56dp for primary actions
|
|
147
|
+
- Visual size ≠ touch target (use padding)
|
|
148
|
+
|
|
149
|
+
## Accessibility
|
|
150
|
+
- TalkBack: content descriptions, state announcements
|
|
151
|
+
- Touch exploration: logical traversal order
|
|
152
|
+
- Font scaling: test 150%, 200%
|
|
153
|
+
- Contrast: 4.5:1 normal, 3:1 large
|
|
154
|
+
- Reduced motion: disable non-essential animation
|
|
155
|
+
|
|
156
|
+
## Dark Theme
|
|
157
|
+
- Surface tones: `surface/90` (elevated), `surface/80` (default)
|
|
158
|
+
- Avoid pure black (#000) — use `surface/10` or `background`
|
|
159
|
+
- Elevation: lighter surfaces appear closer
|
|
160
|
+
- Images: reduce opacity or apply scrim
|
|
161
|
+
|
|
162
|
+
## Responsive Breakpoints
|
|
163
|
+
| Window Size | Breakpoint | Layout |
|
|
164
|
+
|-------------|------------|--------|
|
|
165
|
+
| Compact | < 600dp | Phone |
|
|
166
|
+
| Medium | 600–840dp | Tablet portrait, foldable |
|
|
167
|
+
| Expanded | 840–1200dp | Tablet landscape |
|
|
168
|
+
| Large | 1200–1600dp | Desktop |
|
|
169
|
+
| Extra Large | > 1600dp | Wide desktop |
|
|
170
|
+
|
|
171
|
+
## Resources
|
|
172
|
+
- Material 3: https://m3.material.io/
|
|
173
|
+
- Material Components: https://github.com/material-components/material-components-android
|
|
174
|
+
- Android Design: https://developer.android.com/design
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Android Navigation Patterns
|
|
2
|
+
|
|
3
|
+
Platform-native navigation for Android. Use when adapting iOS patterns.
|
|
4
|
+
|
|
5
|
+
## System Back Behavior
|
|
6
|
+
|
|
7
|
+
### Gesture Navigation (Android 10+)
|
|
8
|
+
- Swipe from left/right edge → back
|
|
9
|
+
- App must not intercept edge gestures
|
|
10
|
+
- `OnBackPressedCallback` for custom handling
|
|
11
|
+
|
|
12
|
+
### 3-Button Navigation
|
|
13
|
+
- Dedicated back button (system)
|
|
14
|
+
- Same callback system
|
|
15
|
+
|
|
16
|
+
### Predictive Back (Android 14+)
|
|
17
|
+
- User sees preview of destination during back gesture
|
|
18
|
+
- Implement `OnBackPressedCallback` with animations
|
|
19
|
+
- Opt-in per activity
|
|
20
|
+
|
|
21
|
+
### Back Handling Rules
|
|
22
|
+
1. **Always** handle back predictably
|
|
23
|
+
2. **Never** require custom back button in UI
|
|
24
|
+
3. **Dismiss** dialogs, sheets, keyboards first
|
|
25
|
+
4. **Navigate** up hierarchy, not laterally
|
|
26
|
+
5. **Exit** app only from root destination
|
|
27
|
+
|
|
28
|
+
## Navigation Components (Jetpack Navigation)
|
|
29
|
+
|
|
30
|
+
### Navigation Graph
|
|
31
|
+
```xml
|
|
32
|
+
<navigation>
|
|
33
|
+
<fragment android:id="@+id/home" ... />
|
|
34
|
+
<fragment android:id="@+id/detail" ... />
|
|
35
|
+
<action android:id="@+id/toDetail" app:destination="@id/detail" />
|
|
36
|
+
</navigation>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Deep Links
|
|
40
|
+
```xml
|
|
41
|
+
<deepLink app:uri="https://example.com/profile/{userId}" />
|
|
42
|
+
```
|
|
43
|
+
- Auto-generates `PendingIntent`
|
|
44
|
+
- Handles app not installed → Play Store
|
|
45
|
+
|
|
46
|
+
### Nested Graphs
|
|
47
|
+
- Feature modules with own graphs
|
|
48
|
+
- Encapsulated navigation state
|
|
49
|
+
|
|
50
|
+
### Safe Args
|
|
51
|
+
- Type-safe argument passing
|
|
52
|
+
- Gradle plugin generates Directions/Args classes
|
|
53
|
+
|
|
54
|
+
## Top App Bar Patterns
|
|
55
|
+
|
|
56
|
+
### Standard
|
|
57
|
+
- Title + actions
|
|
58
|
+
- 64dp height
|
|
59
|
+
- Elevation 4dp
|
|
60
|
+
|
|
61
|
+
### Centered Title (Large)
|
|
62
|
+
- Title centered, expands on scroll
|
|
63
|
+
- 128dp → 64dp collapse
|
|
64
|
+
- Use for content-heavy screens
|
|
65
|
+
|
|
66
|
+
### Search
|
|
67
|
+
- Expandable search field
|
|
68
|
+
- Collapses to icon
|
|
69
|
+
- Keyboard handling
|
|
70
|
+
|
|
71
|
+
### Bottom App Bar
|
|
72
|
+
- FAB integration
|
|
73
|
+
- Actions + overflow
|
|
74
|
+
- 64dp height
|
|
75
|
+
|
|
76
|
+
## Bottom Navigation
|
|
77
|
+
|
|
78
|
+
### Specifications
|
|
79
|
+
- 3–5 destinations
|
|
80
|
+
- Height: 56dp (56dp + safe area)
|
|
81
|
+
- Icon: 24×24dp
|
|
82
|
+
- Label: 12sp, max 2 lines
|
|
83
|
+
- Active: primary color, inactive: onSurfaceVariant
|
|
84
|
+
|
|
85
|
+
### Behavior
|
|
86
|
+
- Tap: navigate to destination
|
|
87
|
+
- Long press: no action (accessibility)
|
|
88
|
+
- Reselect: scroll to top / refresh
|
|
89
|
+
- Hide on scroll: optional, use `hideOnScroll`
|
|
90
|
+
|
|
91
|
+
### Badging
|
|
92
|
+
- Small dot or count
|
|
93
|
+
- Max 2 digits + "99+"
|
|
94
|
+
|
|
95
|
+
## Navigation Rail
|
|
96
|
+
|
|
97
|
+
### When to Use
|
|
98
|
+
- Tablets (≥ 600dp width)
|
|
99
|
+
- 4–7 destinations
|
|
100
|
+
- Landscape phones
|
|
101
|
+
|
|
102
|
+
### Specifications
|
|
103
|
+
- Width: 72dp (compact), 240dp (expanded)
|
|
104
|
+
- Height: full screen
|
|
105
|
+
- Icon: 24×24dp
|
|
106
|
+
- Label: 12sp, show on expanded/hover
|
|
107
|
+
- Selected: primary container background
|
|
108
|
+
|
|
109
|
+
### Responsive
|
|
110
|
+
```
|
|
111
|
+
Phone (<600dp) → Bottom Navigation
|
|
112
|
+
Tablet (600-840dp) → Navigation Rail (compact)
|
|
113
|
+
Large (≥840dp) → Navigation Rail (expanded) or Permanent Drawer
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Navigation Drawer
|
|
117
|
+
|
|
118
|
+
### Modal (Standard)
|
|
119
|
+
- Overlays content
|
|
120
|
+
- Swipe from edge or hamburger
|
|
121
|
+
- 280–320dp width
|
|
122
|
+
- Elevation 16dp
|
|
123
|
+
|
|
124
|
+
### Permanent (Large Screens)
|
|
125
|
+
- Always visible
|
|
126
|
+
- Pushes content
|
|
127
|
+
- 240dp (compact), 320dp (standard)
|
|
128
|
+
|
|
129
|
+
### Content
|
|
130
|
+
- Header: user avatar, name, email
|
|
131
|
+
- Destinations: icon + label
|
|
132
|
+
- Dividers between groups
|
|
133
|
+
- Footer: settings, help
|
|
134
|
+
|
|
135
|
+
## Tabs
|
|
136
|
+
|
|
137
|
+
### Fixed Tabs
|
|
138
|
+
- Equal width, full width
|
|
139
|
+
- 48dp height
|
|
140
|
+
- Indicator: 3dp primary line
|
|
141
|
+
- Label: 14sp, 500 weight
|
|
142
|
+
|
|
143
|
+
### Scrollable Tabs
|
|
144
|
+
- Variable width
|
|
145
|
+
- Centered or start-aligned
|
|
146
|
+
- Min width: 72dp, max: 264dp
|
|
147
|
+
|
|
148
|
+
### Tab + Swipe (ViewPager2)
|
|
149
|
+
- Swipe between siblings
|
|
150
|
+
- Preload: 1 offscreen
|
|
151
|
+
- Offscreen page limit: 3
|
|
152
|
+
|
|
153
|
+
## Modal Navigation
|
|
154
|
+
|
|
155
|
+
### Bottom Sheet (Modal)
|
|
156
|
+
- Half-screen or full-screen
|
|
157
|
+
- Drag handle (24×4dp)
|
|
158
|
+
- Back dismisses
|
|
159
|
+
- Scrim: 32% black
|
|
160
|
+
|
|
161
|
+
### Dialog
|
|
162
|
+
- Centered, max 560dp width
|
|
163
|
+
- 24dp margins
|
|
164
|
+
- Title + content + actions
|
|
165
|
+
- Back dismisses
|
|
166
|
+
|
|
167
|
+
### Full-Screen Dialog
|
|
168
|
+
- Complex flows (wizard, settings)
|
|
169
|
+
- Close button (not back) to discard
|
|
170
|
+
- Back = close without save
|
|
171
|
+
|
|
172
|
+
## State Restoration
|
|
173
|
+
|
|
174
|
+
### Process Death
|
|
175
|
+
- `onSaveInstanceState` → Bundle
|
|
176
|
+
- ViewModel survives (if not killed)
|
|
177
|
+
- `SavedStateHandle` for ViewModel
|
|
178
|
+
|
|
179
|
+
### Configuration Change
|
|
180
|
+
- Rotation, font size, theme, language
|
|
181
|
+
- ViewModel retains state
|
|
182
|
+
- Compose: `rememberSaveable`
|
|
183
|
+
|
|
184
|
+
### Deep Link Restore
|
|
185
|
+
- Parse intent → navigate
|
|
186
|
+
- Restore back stack
|
|
187
|
+
- `NavController.restoreState()`
|
|
188
|
+
|
|
189
|
+
## Platform Differences vs iOS
|
|
190
|
+
|
|
191
|
+
| iOS | Android |
|
|
192
|
+
|-----|---------|
|
|
193
|
+
| Swipe back from left edge | Swipe from left OR right edge |
|
|
194
|
+
| Navigation bar (always) | Top app bar (contextual) |
|
|
195
|
+
| Tab bar (fixed) | Bottom nav / Rail / Drawer |
|
|
196
|
+
| Large title (scroll) | Collapsing toolbar |
|
|
197
|
+
| Modal sheet (swipe down) | Bottom sheet (drag handle) |
|
|
198
|
+
| Alert (centered) | Dialog (centered) / Bottom sheet |
|
|
199
|
+
| Back button (top-left) | System back (gesture/button) |
|
|
200
|
+
| Split view (iPad) | Multi-window / Freeform |
|
|
201
|
+
|
|
202
|
+
## Testing Checklist
|
|
203
|
+
- [ ] System back works from every screen
|
|
204
|
+
- [ ] Deep links open correct destination
|
|
205
|
+
- [ ] Back stack correct after deep link
|
|
206
|
+
- [ ] Rotation preserves state
|
|
207
|
+
- [ ] Process death restores state
|
|
208
|
+
- [ ] Bottom nav reselection scrolls to top
|
|
209
|
+
- [ ] Touch targets ≥ 48dp
|
|
210
|
+
- [ ] TalkBack announces navigation
|
|
211
|
+
- [ ] Landscape/large screen layouts work
|
|
212
|
+
- [ ] Foldable posture changes handled
|