-
Notifications
You must be signed in to change notification settings - Fork 0
Retained Fragment
Leonardo Miceli edited this page Jun 1, 2016
·
5 revisions
Retained Fragments are kept on rotation while the activity, fragment manager and views are destroyed. onCreate is not called, but onCreateView does.
Useful to avoid loading expensive data and to allow uninterrumpted execution (sound)
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
mBeatBox = new BeatBox(getActivity());
}by lmiceli