Loving Lean Layout
summary
Layouts cost by view count and hierarchy depth, which multiplies measure/layout work and causes jank; RelativeLayout forces an extra measure/layout pass (and nesting multiplies that), lists repeat item cost, and nested weights explode computation. Use Hierarchy Viewer and Android Studio’s Layout Inspector for structure, Systrace or dump gfxinfo for frame timing and FrameMetricsListener on N for per-frame stats, run lint to catch useless parents and deep nesting, replace ImageView+TextView with compound drawables or multiple TextViews with spannables, try ConstraintLayout (alpha) or custom ViewGroups when necessary.
AI-written summary · about
chapters (15)
- 0:00Introduction to lean layouts
- 1:39Why performance matters
- 5:32Understanding view rendering
- 9:38Finding layout problems
- 11:47Using Hierarchy Viewer
- 12:57Layout inspector tools
- 14:15Advanced performance tools
- 16:12Fixing layout issues
- 20:15Optimizing with attributes
- 22:58Spannables and flattening
- 24:52Choosing the right layout
- 26:04Constraint layout
- 26:53Going custom
- 29:14Good practices for layouts
- 31:53Q&A session
related talks
41mLoving Lean Layouts
38mLoving Lean Layouts
30mLet’s Sprinkle some #PerfMatters on your ViewGroups
42mMeasure. Layout. Draw. Repeat: Custom Views and ViewGroups
29mDemystifying Constraint Layout
30mIn‑Depth: ViewGroup Layout Internal Implementation
48mEfficient Android Layouts
45mCreating Layouts doesn’t have to be painful
