Loving Lean Layouts
summary
Layouts that are simple and shallow cut memory and CPU: replacing a LinearLayout + ImageView + TextView with a single TextView using compound drawables drops three views to one and reduces depth. Tools shown include Hierarchy Viewer (visual tree + millisecond timings), systrace, dumpsys gfxinfo and Marshmallow frame stats. Pitfalls: RelativeLayout doubles measure passes (and multiplies when nested), nested weights and list-item replication amplify cost. Custom ViewGroups or drawing on canvas remove extra passes but cost development time.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 2:02Agenda
- 2:43What is Lean
- 3:48Performance
- 5:30Maintainability
- 7:31View Hierarchy
- 8:47Performance Problems
- 13:48Hierarchy Viewer
- 19:20Fixing Problems
- 23:50Simplify and Reduce
- 32:22Custom View Groups
- 35:43Good Practices
related talks
35mLoving Lean Layout
38mLoving Lean Layouts
48mEfficient Android Layouts
34mFlat as a pancake
30mLet’s Sprinkle some #PerfMatters on your ViewGroups
42mMeasure. Layout. Draw. Repeat: Custom Views and ViewGroups
45mCreating Layouts doesn’t have to be painful
51mMeasure, Layout, Draw, Repeat: Custom Views and ViewGroups
