public static void ClearBackStack(this Android.Support.V4.App.FragmentManager manager) { for (var i = 0; i < manager.BackStackEntryCount; i++) { manager.PopBackStack(); } }
private void DeleteUser() { int position = AppData.singleUserPosition; string name = AppData.curUser.Users[position].FirstName + " " + AppData.curUser.Users[position].LastName; AppData.curUser.Users.RemoveAt(position); SupportFragmentManager.PopBackStack(); SaveController.SetUser(AppData.curUser); Toast.MakeText(this, name + " was deleted.", ToastLength.Short).Show(); }
protected override void OnBeforeCommitReplaceFragment(FragmentManager fm, Android.Support.V4.App.FragmentTransaction ft, Fragment fragment) { base.OnBeforeCommitReplaceFragment(fm, ft, fragment); if (fragment is SessionDetailFragment) { ft.AddToBackStack(null); } else if (fragment is SessionsFragment) { fm.PopBackStack(); } UpdateBreadCrumb(); }
protected override void OnBeforeCommitReplaceFragment(FragmentManager fm, Android.Support.V4.App.FragmentTransaction ft, Fragment fragment) { base.OnBeforeCommitReplaceFragment(fm, ft, fragment); if (fragment is SessionDetailFragment) { ft.AddToBackStack(null); } else if (fragment is SessionsFragment) { fm.PopBackStack(); } UpdateBreadCrumb(); }
public void OnClick(View v) { mFragmentManager.PopBackStack(); }