~/talk

The Importance of Measure

Talkat droidCon NYC 2018 · 2018-08-27..08-28· [android, web-performance]
links:none on file
slides:none on file

Explains how Android runs a top‑down measure then layout then draw, why onMeasure must call setMeasuredDimension, and how MeasureSpec modes (UNSPECIFIED, EXACTLY, AT_MOST) and resolveSize determine final size. Shows a custom 500×500 dp view that still gets clipped inside a 200×200 parent, notes measurement can be invoked four times in tricky cases and must finish within 16 ms, and gives concrete fixes for padding, text sizing, and a ViewPager height workaround (measure children with UNSPECIFIED and use the max).

AI-written summary · about

  1. 0:00Introduction to measurement
  2. 1:10Android layout phases
  3. 2:36Parent-child measurement process
  4. 5:05Understanding measure specs
  5. 6:32Breaking measure rules demo
  6. 8:38Measure spec quiz examples
  7. 14:57Using MeasureSpec class
  8. 17:01Proper measurement techniques
  9. 18:23Accounting for padding
  10. 20:11Measuring content correctly
  11. 21:56ViewGroup measurement tips
  12. 22:18Custom ViewPager example
  13. 25:51Summary and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.