Efficient Android Layouts
summary
Shows concrete choices and fixes: prefer a simple FrameLayout for overlays and toggle containers, implement a reusable avatar as a custom view that inflates subviews with the merge tag to avoid extra wrappers, replace many small label views with one custom onDraw view to fix huge rendering slowdowns, use drawable XML layering plus a v21 ripple and AppCompat for theme backporting, drive variants with resource qualifiers and booleans, and convert designer SVGs into Android vectors with Victor to eliminate repeated PNG work.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 2:13RelativeLayout / ConstraintLayout
- 3:01LinearLayout
- 5:38FrameLayout
- 10:20Custom Drawing
- 14:22Custom Drawables
- 15:07Styles
- 16:27Not Efficient
- 18:17Themes
- 20:14AppCompat
- 26:19Resource Qualifier System
- 28:53Resources as code
- 35:04Drawable XML
- 35:55Button Outline
- 37:54Button Selector (v21)
- 38:37Button Versions
- 39:08Vector drawables
- 40:27SVG - Vector Drawable
- 43:07Tinting Images
related talks
41mLoving Lean Layouts
45mCreating Layouts doesn’t have to be painful
46mBuilding a modern Android UI
40mWriting Custom Views for Android
35mLoving Lean Layout
27mView into the abyss
42mMeasure. Layout. Draw. Repeat: Custom Views and ViewGroups
12mDesigning a high quality app with the latest Android features
