Android interview summary - how is ViewModel saved and restored?
Combined with the previous article Android interview summary - ViewModel We know:
When the configuration changes, the Activity#onRetainNonConfigurationInstance() will be called to save the ViewModel The object mViewModelStore of the example is called and getViewModelStore() is called after the Activity is rebuilt. ensureViewModelStore() cal ...
Added by foreverhex on Fri, 28 Jan 2022 03:22:53 +0200