Ejemplo n.º 1
0
        public virtual void ShowAllowingStateLoss(FragmentManager manager, string tag)
        {
            FragmentTransaction ft = manager.BeginTransaction();

            ft.Add(this, tag);
            ft.CommitAllowingStateLoss();
        }
Ejemplo n.º 2
0
 public void Dismiss()
 {
     if (dismissed)
     {
         return;
     }
     dismissed = true;
     new Handler().Post(() => {
         FragmentManager.PopBackStack();
         V4FragmentTransaction ft = FragmentManager.BeginTransaction();
         ft.Remove(this);
         ft.CommitAllowingStateLoss();
     });
 }
Ejemplo n.º 3
0
 public void Show(V4FragmentManager manager)
 {
     if (!dismissed || manager.IsDestroyed)
     {
         return;
     }
     dismissed = false;
     new Handler().Post(() => {
         V4FragmentTransaction ft = manager.BeginTransaction();
         ft.Add(this, "actionSheet");
         ft.AddToBackStack(null);
         ft.CommitAllowingStateLoss();
     });
 }
Ejemplo n.º 4
0
        public void NavigateTo(Android.Support.V4.App.Fragment newFragment)
        {
            try
            {
                Android.Support.V4.App.FragmentManager     mFragmentManager     = null;
                Android.Support.V4.App.FragmentTransaction mFragmentTransaction = null;

                _currentFragment     = newFragment;
                mFragmentManager     = SupportFragmentManager;
                mFragmentTransaction = mFragmentManager.BeginTransaction();
                mFragmentTransaction.Replace(Resource.Id.frame, _currentFragment);
                mFragmentTransaction.SetTransition((int)FragmentTransit.FragmentFade);
                mFragmentTransaction.CommitAllowingStateLoss();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }