My application crashes whenever my location is changed. Application structure is simple: there is one Activity and a many fragments. Conclusion fragment is carried out as follows:
ItemsFragment itemsFragment = new ItemsFragment () {GroupID = groupID, CurrentGroup = currentGroup};
itemsFragment.RetainInstance = true;
var fragmentManager = SupportFragmentManager.BeginTransaction ();
fragmentManager.Replace (Resource.Id.flContent, (SupportFragment) itemsFragment);
fragmentManager.AddToBackStack (null);
fragmentManager.Commit ();
I use C # Xamarin, but java principle is the same, only slightly different syntax. Help a newbie android-developers to understand the reason.
On the mobile device produces an error:
“Unfortunately App has Stopped”
Where only can be put try... catch and got this error:
Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState