I'm trying to save data in a Fragment's onSaveInstanceState(), but the method is never called.
Can someone help?
public class MyFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
ScrollView content = (ScrollView) inflater.inflate(R.layout.content, container, false);
// More stuff
return content;
}
@Override
public void onSaveInstanceState(Bundle icicle) {
// NEVER CALLED
super.onSaveInstanceState(icicle);
//More stuff
}
}