Exemple #1
0
        private void CloseDialog(string dialogName)
        {
            FragmentManager fragmentManager = SupportFragmentManager;
            DialogFragment  fragment        = (DialogFragment)fragmentManager.FindFragmentByTag(dialogName);

            if (fragment != null)
            {
                fragment.Dismiss();
            }
        }
Exemple #2
0
        public void startDialogFragment(v4App.DialogFragment dialogFragment)
        {
            v4App.FragmentTransaction ft = SupportFragmentManager.BeginTransaction();
            //Remove fragment else it will crash as it is already added to backstack
            v4App.Fragment prev = SupportFragmentManager.FindFragmentByTag("dialog");
            if (prev != null)
            {
                ft.Remove(prev);
            }
            ft.AddToBackStack(null);

            dialogFragment.Show(ft, "dialog");
        }
Exemple #3
0
 public void ShowError(String errorMessage)
 {
     Android.Support.V4.App.DialogFragment fragment = ErrorDialogFragment.NewInstance(
         Resource.String.validationErrors, errorMessage);
     fragment.Show(mFragmentManager, "error");
 }