Learning Path
Welcome to radiography
Your guide to understanding the codebase
4 levels
12 learning units
Orchestration & APIs
- Pipelines, workflows, public interfaces • 3 units
- View Hierarchy Inspection Fundamentals
- Architecture · 9
- String Tree Rendering Basics
- Patterns · 6
- Testing Setup and Infrastructure
- Testing · 8
Core Logic & Data
- Business rules, schemas, models • 2 units
- Android View Rendering
- Patterns · 11
- View Filtering System
- Patterns · 6
Interaction & Integration
- UI components, external connectors • 3 units
- Compose Detection and Access
- Integration · 10
- Compose Rendering System
- Patterns · 13
- Compose Testing Integration
- Testing · 8
Cross-Cutting Concerns
- Auth, logging, config, testing • 1 units
- Experimental APIs and Extensions
- Patterns · 8
Test Your Knowledge
21 questions across all levels
Progress
0/21 answered
Hands-On Assignment
45-60 minutes
Your Challenge
Add a custom view attribute inspector that can extract and display specific View properties (like alpha, rotation, or custom attributes) in the radiography output. The inspector should be pluggable, allowing developers to register custom attribute extractors for different View types, and should integrate seamlessly with the existing string tree rendering system.
Starting Points
radiography/src/main/java/radiography/ScannableView.kt:1-50- Understand how views are wrapped and what information is currently extracted from them
radiography/src/main/java/radiography/ViewStateRenderers.kt:1-100- Study how view state is currently rendered to strings - this is the rendering pipeline you'll extend
radiography/src/main/java/radiography/ViewFilters.kt:1-80- Reference this for the pattern of composable, chainable view processing functions
radiography/src/main/java/radiography/Radiography.kt:1-150- This is where you'll need to integrate your attribute inspector into the scanning configuration
radiography/src/test/java/radiography/ViewStateRenderersTest.kt:1-100- Use this test structure as a model for testing your attribute inspector
Success Criteria
- Can register a custom attribute extractor for a specific View type (e.g., extract alpha and rotation from any View)
- Custom attributes appear in the string tree output alongside existing view information
- Multiple extractors can be registered and all execute during scanning
- Extractors are type-safe - only execute for matching View types or subclasses
- Existing radiography tests still pass without modification
- Your implementation includes at least 2 unit tests demonstrating the feature
Hints
- Hint 1: Understanding the rendering pipeline conceptual
- Hint 2: Where attributes are currently extracted code location
- Hint 3: Making it extensible implementation
- Hint 4: Integration point implementation
- Hint 5: Testing strategy testing
Prerequisites:
- Kotlin functional programming patterns
- Android View system basics
- Type-safe builders and DSLs