Tag: monitors

How does an activity manage configuration changes while ensuring the ViewModel instance remains…

Question: How does ViewModelProviders know when there is a configuration change vs user explicitly creating a new activity or onDesctory() called? Answer:  The provided code within ComponentActivity monitors lifecycle changes. If onDestroy() is invoked without configuration changes, ...