0 votes
in Android by
What are Retained Fragments?

1 Answer

0 votes
by

By default, Fragments are destroyed and recreated along with their parent Activity’s when a configuration change occurs.

Calling setRetainInstance(true) allows us to bypass this destroy-and-recreate cycle, signaling the system to retain the current instance of the fragment when the activity is recreated.

...