public void CreateLoadView(int containerViewId, Android.Support.V4.App.Fragment fragmentView) { var transaction = this.FragmentManager.BeginTransaction(); transaction.Replace(containerViewId, fragmentView) .AddToBackStack($"{fragmentView.GetType().Name}") .Commit(); }
private static TFragment SafeCast <TFragment>(Android.Support.V4.App.Fragment fragment) where TFragment : Android.Support.V4.App.Fragment { if (!(fragment is TFragment)) { Mvx.Warning("Fragment type mismatch got {0} but expected {1}", fragment.GetType().FullName, typeof(TFragment).FullName); return(default(TFragment)); } return((TFragment)fragment); }