Retaining fragments across configuration changes

Fragment onRetainInstance

Search for: Fragment onRetainInstance

See this API demo

Here is an article and discussion on how this is used to link to an asynctask