Build a complete Android UI framework using Jetpack Compose with Material 3 theming, custom components, and accessibility-first design.
## ROLE You are an Android platform architect specializing in Jetpack Compose and modern Android development. You have extensive experience with Material Design 3, Kotlin coroutines, Hilt dependency injection, and building design systems that scale across multiple Android form factors. ## OBJECTIVE Create a production-ready UI framework using Jetpack Compose for a [APP_TYPE: e-commerce/banking/media streaming/task management] Android application. The framework must include a complete design system, navigation architecture, and reusable component library that supports phones, tablets, foldables, and Wear OS companions. ## TASK ### Step 1: Material 3 Theme Configuration Build the dynamic theming system: - Custom ColorScheme with light, dark, and dynamic color (Material You) variants - Typography scale using [BRAND_FONT] with proper weight and size mappings - Shape system with custom corner radii for small, medium, and large components - Elevation and surface tint configuration - Theme switching at runtime with smooth transitions - Color token export from [DESIGN_TOOL: Figma/Sketch] to Compose theme code ### Step 2: Component Library Architecture Design the composable component hierarchy: - Atomic design methodology: atoms (buttons, inputs, icons), molecules (cards, list items), organisms (forms, product grids) - Slot-based API design for maximum flexibility and composition - State hoisting patterns with remember and rememberSaveable - CompositionLocal providers for theme overrides in specific subtrees - Preview annotations with @PreviewLightDark, @PreviewScreenSizes, and @PreviewFontScale - Component documentation with [DOCUMENTATION_TOOL: Showkase/custom catalog app] ### Step 3: Navigation with Compose Implement type-safe navigation: - Navigation graph definition using Kotlin Serialization-based routes - Nested navigation graphs for feature modules: [FEATURE_MODULES] - Shared element transitions between screens using AnimatedContent - Bottom navigation bar with badge indicators and FAB integration - Deep link handling for [URI_SCHEME]://[PATHS] - Back stack management and result passing between destinations ### Step 4: Adaptive Layouts Build responsive layouts for all form factors: - WindowSizeClass detection and layout switching (compact/medium/expanded) - List-detail pattern for tablets and foldables using NavigationSuiteScaffold - Foldable device support with window folding state detection - Landscape orientation adaptations - Wear OS companion composables for [WATCH_FEATURES: notifications/quick actions/tiles] ### Step 5: Animation & Motion System Create a cohesive animation language: - Shared transition specifications for enter/exit/shared element animations - Spring-based animations with consistent stiffness and damping values - Gesture-driven animations using Modifier.pointerInput and AnchoredDraggable - Lottie integration for complex [ANIMATION_TYPE: loading/success/onboarding] animations - Motion reduce respect for accessibility settings - Performance profiling with composition tracing and recomposition counter ### Step 6: Accessibility Implementation Ensure WCAG 2.1 AA compliance: - Semantic properties with contentDescription, Role, and stateDescription - Custom accessibility actions for complex interactive elements - Focus management and traversal order customization - TalkBack testing checklist for every component - Switch Access and Voice Access compatibility - Minimum touch target sizes (48dp) enforcement via custom lint rules ### Step 7: Performance Optimization Optimize Compose rendering performance: - Stability annotations (@Stable, @Immutable) for data classes - Derivation and skipping strategies to minimize recompositions - LazyColumn/LazyGrid optimization with proper key management - Image loading with Coil 3 and memory/disk caching configuration - Baseline Profiles generation for startup and scrolling performance - Macrobenchmark tests for [CRITICAL_FLOWS: app startup/feed scrolling/checkout] Deliver the complete framework with a sample feature implementation demonstrating all patterns.
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[BRAND_FONT][FEATURE_MODULES][URI_SCHEME][PATHS]