~/talk

Not Just Rotation: Configuration Changes on Android

Talkat DroidKaigi 2019 · 2019-02-07..02-08· [android, frontend-architecture]
links:none on file
slides:none on file

Android configuration changes include orientation, window/screen size, UI mode, font scale and pixel density, external displays and foldables, and keyboard presence; rotation is only one. Options: rely on onSaveInstanceState (limited to primitives and can be slow under rapid resizes), keep UI state in memory with ViewModel (fast but loses state if process is killed), or declare and implement onConfigurationChanged (no recreation, highest complexity). Example: picture-in-picture plus bottom navigation required copying Configuration via setTo and inflating alternate layouts; recommendation is ViewModel plus instance state and heavy testing.

AI-written summary · about

  1. 0:00Introduction
  2. 1:16Configuration Properties
  3. 4:13Configuration Changes
  4. 7:43Handling Configuration Changes
  5. 11:37View Model
  6. 13:00Configuration Change on Your Own
  7. 13:42Screen Size
  8. 15:12Picture in Picture
  9. 16:30Code
  10. 19:15Saving Instances
  11. 21:21Conclusion
~/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.