A Lighter Layout Abstraction With Contour
summary
Contour is an open‑source Cash App Kotlin library that replaces XML UIs with a thin DSL around Android layout APIs, using Contour layout and applyLayout solvers to compute position and size at runtime. It exposes parent and sibling geometry, supports optional lazy views, cyclical layouts via max/min of solvers, and compiles safer with xInt/yInt inline classes for axis type safety. It removes findViewById, inflation and many extra view wrappers while remaining compatible with existing Android views.
AI-written summary · about
chapters (8)
- 0:00Introduction to Contour
- 3:23Why front-end development matters
- 8:00Contour layout basics
- 13:59Contour vs ConstraintLayout
- 17:11Example: Centering views
- 22:46Cyclical layouts in Contour
- 26:55Math-driven layout benefits
- 29:25Eliminating XML pain points








