How to save Object while orientation change, since onRetainNonConfigurationInstance and getLastNonConfigurationInstance are deprecated. And which cannot me used with compa
There are two alternatives:
Loader. The FragmentActivity will take care of saving/restoring its state when re-creating.setRetainInstance(true) on it. There is an example of this in the compatibility library's source, FragmentRetainInstanceSupport or some such.