0

You can find my project archive here.

I would be grateful to anyone who will give my problem a try press "Text" => "Cursor Adapter" => "Museums" then select any of the museums. The navigation between tabs does not causes problems but when either the "Menu Fragment" Tab or the "On Map Fragment" is selected and i press the back button the following problem occurs:

07-28 16:06:47.410: E/AndroidRuntime(21839): java.lang.RuntimeException: 
    Unable to destroy activity {com.example.thesguideproject/com.example.thesguideproject.Test}: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Wundwin Born
  • 3,409
  • 18
  • 35
tsiro
  • 2,173
  • 3
  • 21
  • 39
  • 1
    Please check http://stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-h, or http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html – Atul O Holic Jul 28 '14 at 13:27
  • I have read all the related solutions but i couldn't figure out what i am doing wrong – tsiro Jul 28 '14 at 13:38
  • i think i solved the problem, i removed this code: Fragment fragment = (getFragmentManager().findFragmentById(R.id.mapfragment)); FragmentTransaction ft = getActivity().getSupportFragmentManager().beginTransaction(); ft.remove(fragment); //ft.detach(fragment); ft.commit(); from onDestroyView to onPause method – tsiro Jul 28 '14 at 13:47
  • Atul O Holic thanks a lot for the second link you suggested – tsiro Jul 28 '14 at 13:50
  • Your welcome. :) Glad it helped – Atul O Holic Jul 28 '14 at 17:36

0 Answers0