Deep Dive Into Size Configuration Changes
summary
Size configuration values represent the activity’s window, not the physical screen, and can differ because of dynamic insets and integer rounding (example: Pixel 7 Pro rounding leads to a one‑pixel gap). Use WindowMetricsCalculator (AndroidX.window) to get exact window size in pixels, and rely on view.onConfigurationChanged (or Compose’s LocalConfiguration.current) to recompute on every config change. Since Android 7 activity recreation happens only for significant resource changes, and APIs 30–33 have callback inconsistencies that API34 fixes.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 2:10Static size configurations
- 12:21Insets and rounding issues
- 19:02Dynamic size changes
- 28:57Recommendations and summary
related talks
32mDeep dive into size configuration changes
41mDeep dive into size configuration changes
33mOptimize your app for large screens
28mBuilding Robust Screens That Handle Window Size Changes
40mOptimize your app for large screens
26mThe Importance of Measure
23mNot Just Rotation: Configuration Changes on Android
24mWhy is my app letterboxed?!
