I saw that when I execute
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
MyFragment myFragment = new MyFragment();
fragmentTransaction.replace(R.id.parent, myFragment, "MyFragment");
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
there is no method called on the old fragment. I tried with:
- onStop();
- onPause();
- onDestroy();
- onDetach();
No one is called, why?