Colton Idle
05/27/2020, 6:40 AMArun
05/27/2020, 6:53 AMSinan Kozak
05/27/2020, 7:12 AMManuel Vivo
05/27/2020, 7:21 AMonRetainCustomNonConfigurationInstance
being deprecated).
As a workaround (and with a better API), you can use this wrapper (but it uses AAC VM under the hood even though is not part of the public API).
https://stackoverflow.com/questions/57922225/onretaincustomnonconfigurationinstance-deprecated-in-androidx
If you wait for Hilt, you will also have an ActivityRetainedComponent
that you can use. But as Sinan said, you’ll also be able to inject AAC VMs with just a single annotation @ViewModelInject
, so the burden of creating factories and using multibinding is taking away from you.Manuel Vivo
05/27/2020, 7:21 AMArun
05/27/2020, 7:31 AMSurviving configuration changes is not an easy task, we all know thatLooking forward to Hilt, tried it sometime back, the graph is interesting. Nice to have out of the box support for config changes.
Colton Idle
05/27/2020, 3:50 PM