Using `onRetainCustomNonConfigurationInstance` to retain data across configuration changes
问题 I've been programming for Android for some time, and I'm still looking for solutions to retain data over configuration changes. Aside from saving Parcelable s to Activity's Bundle in onSaveInstanceState docs are suggesting using Fragment with setRetainInstance flag set to true. But I've just come across some code that uses onRetainCustomNonConfigurationInstance to hold arbitrary objects (in a fancy way, but essentially big objects without references to Activity etc.). I have never seen this