I don't really see how it would help. It says in the documentation that this can be used for optimizing performance when the configuration changes, e.g. for passing around objects that are expensive to construct or serialize. However, it is mentioned that this is not a replacement for onSaveInstanceState() and that one must still implement the latter (which then performs the expensive serialization).
Since onRetainNonConfigurationInstance() is called after onSaveInstanceState(), there is also no way to check whether the former method has already been called, so you must always serialize/ parcel the expensive object in advance. In other words, I could check in onCreate() whether getLastNonConfigurationInstance() returns something, but even if it does, the expensive call to onSaveInstanceState() has already happened so I win nothing. What's the idea behind this method then? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

