Best practices for saving UI state on Android

Subscribers:
1,270,000
Published on ● Video Link: https://www.youtube.com/watch?v=V-s4z7B_Gnc



Duration: 20:36
20,567 views
470


Saving a UI state properly is essential for providing a great UX experience. Your users might be disappointed if your screen doesn't preserve its state during a configuration change, activity recreation, or system-initiated process death. Learn best practices to save UI state properly in both the View system and Jetpack Compose by comparing APIs such as remember, rememberSaveable, onSaveInstanceState, ViewModel, and SavedStateHandle.

Chapters:
0:00 - Introduction
0:41 - Losing app state
2:10 - ViewModel
4:08 - Persistent storage
5:35 - Saved State APIs
8:45 - Testing saved state APIs
9:29 - SavedStateHandle
10:49 - Contribute to saved state from your own classes
14:33 - Control rememberSaveable value's lifecycle
19:00 - Recap

Resources:
Saving UI state on Android docs → https://goo.gle/438zaus
Save UI state in Compose → https://goo.gle/3KwbwQb

Speaker: Manuel Vicente Vivo

Watch more:
Watch all Android and Play Sessions → https://goo.gle/IO23_android_play
Watch all the Technical Sessions from Google I/O 2023 → https://goo.gle/IO23_sessions
Watch more Mobile Sessions → https://goo.gle/IO23_mobile
All Google I/O 2023 Sessions → https://goo.gle/IO23_all

Subscribe to Android Developers → https://goo.gle/AndroidDevs

#GoogleIO #Featured #AndroidDevelopers #foundation







Tags:
Android
Google I/O
Google IO
IO
I/O
IO 23
I/O 23
Google I/O 23
Google IO 23
Google I/O 2023
Google IO 2023
IO 2023
Google New
Google Announcement
Google Developers
Developer
Development