Callback methods between List Fragment and Crime Fragment


#1

Hi I am almost done with the chapter 17 of the book but I just want to ask something about on how does android call the lifecycle methods of fragment because whenever I press the back button on the action bar or the device back button the calling of the methods goes like this

11-18 13:58:40.884 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onPause Called - CrimeFragment 11-18 13:58:40.884 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onPause Called - CrimeFragment 11-18 13:58:40.888 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDestroyView Called - ListFragment 11-18 13:58:40.896 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDestroy Called - ListFragment 11-18 13:58:40.904 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onCreate Called - ListFragment 11-18 13:58:40.904 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onCreateView Called - ListFragment 11-18 13:58:40.908 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onResume Called - ListFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onStop Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onStop Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDestroyView Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDestroy Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDetach Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDestroyView Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDestroy Called - CrimeFragment 11-18 13:58:42.024 1424-1424/com.example.criminalIntent D/criminalIntent﹕ onDetach Called - CrimeFragment

I know that the onPause was called twice due to on saving the 2 fragments on the file (crime.json) but I am just wondering why does the onDestroy methods of List Fragment was being called and then recreating the whole list fragment. Shouldn’t the onDestroy and onDestroyView methods should be called before the CrimeFragment was being displayed?