~/talk

Deep dive into size configuration changes

Talkat droidcon Berlin 2023 · 2023-07-05..07-07· [android, web-performance]
slides:none on file

States Android 14 behavior: screenWidthDp, screenHeightDp and smallestScreenWidthDp represent the window area not the physical screen, and insets and display cutouts change those values at runtime. Pixel 7 Pro example: 1440×3120 at density 560 yields 411.4286dp rounded to 411, causing a one‑pixel round‑trip error. Size-only changes only recreate activities when resource buckets change (API 24+); APIs 30–33 introduce callback inconsistencies fixed in API 34. Recommended tools are WindowMetricsCalculator, window size classes, and using view.onConfigurationChanged (or Compose’s LocalConfiguration.current) with an activity UI context.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:30What are configuration changes
  3. 3:34Static size configuration basics
  4. 6:05Understanding insets and dimensions
  5. 9:43Dynamic insets and foldables
  6. 11:30Orientation and multi-window quirks
  7. 14:47Rounding and density calculations
  8. 19:34Solutions for accurate window sizing
  9. 21:40Dynamic size configuration changes
  10. 24:34Significant vs insignificant changes
  11. 26:20Handling configuration callbacks
  12. 28:28Reliable view-based callbacks
  13. 30:37API 34 and future behavior
  14. 31:24Best practices and summary
~/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.