I have a listFragment, this is my onActivityCreated:
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (savedInstanceState != null) { utenti=savedInstanceState.getParcelableArrayList("array"); }else{ threadutenti= (GetUtenti) new GetUtenti(this.getActivity(), utenti).execute(); }
When I rotate my device, I first saved the InstanceState, but not null (I got it), but after onActivityCreated is called with onActivityCreated null! What for? I want to get my utenti object on a ListFragment, and not on my activity.
source share