Here is code where my fragment is created:
if (savedInstanceState == null) {
// During initial setup, plug in the details fragment.
FlightListFragment listFragment =
FlightListFragment.newInstance(mSearchParams);
getSupportFragmentManager().beginTransaction().add(
android.R.id.content, listFragment).commit();
}
But all fragment methods called twice! OnCreateView, OnActivityCreated, OnStart.
Why?
Thanks.
Is your fragment set to retain instance? it might be possible that you’re spawning 2 instances of the fragment
Maybe try adding a call to check something like