I have simple Activity and no fragments.
I need to use onRetainNonConfigurationInstance.
Doc says deprecated use Fragment setRetainInstance
Now i don’t have any Fragments in my app. Can i rely over
Deprecated methods to work well on higher api platforms as well ?
Like all deprecated methods, there is no guarantee that
onRetainNonConfigurationInstancewill still work in the next API version.Currently, all android APIs handle it properly, but switching to Fragments is highly recommended as it is the current way to design android UIs. It’s quick and easy, and you won’t have problems later to handle deprecated methods.