Android fragment lifecycle issue with actionbar
问题 I want to realize the navigation of the fragments using the following code: public abstract class BaseFragment extends Fragment { private static String TAG = "BaseFragment"; private BaseFragmentActions baseFragmentActions; @Override public void onAttach(Context context) { super.onAttach(context); Activity activity = null; if (context instanceof Activity){ activity = (Activity) context; } Log.i(TAG, "onAttach = "); try { baseFragmentActions = (BaseFragmentActions)activity; } catch