Creating a UI Toolkit From Scratch
summary
A small UI toolkit called apex toolkit is built from scratch for Android and runs on a demo that draws an image and two buttons and responds to clicks. Architecture uses an entity-component model so widgets are elements plus composable behaviors. Rendering renders every frame via Choreographer to an Android canvas through a partial Android renderer, which works but cheats on invalidation and allocates more than production needs. Source lives at /homegive/experiment/apex and making a production-grade toolkit takes years not months (15 years of platform work cited).
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:50UI Toolkits
- 8:49Live Coding
- 10:17Entity Component Framework
- 20:29UI Toolkit
- 21:42Apex
- 22:45Abstraction Layers
- 23:41Render API
- 24:29Canvas
- 25:07Drawing surfaces
- 26:05Activity
- 28:11Rendering Loop
- 29:28Back to Implementation
- 29:56Renderer
- 30:24Exercises
- 30:44Widgets
- 31:05Invalidation
- 32:28Minimize Allocation
- 33:14Crossplatform abstraction
- 33:53Key takeaway
- 34:11Questions
related talks
30mPrototyping for Android in Principle
33mThe Evolution of Android UI Development. A Journey From XML to Compose. What’s next ?
42mAndroid Graphics: the Path to [UI] Riches
35mCompose Yourself: Designing a Kotlin First UI Toolkit
01h 05mLet's build Android UI with Jetpack Compose
48mA page out of Server driven UI on Android
41mIt Just Works
25mGetting started on Android UI design hub
