Ejemplo n.º 1
0
        public static DialogFragment1 NewInstance(Bundle bundle)
        {
            DialogFragment1 fragment = new DialogFragment1();

            fragment.Arguments = bundle;
            return(fragment);
        }
Ejemplo n.º 2
0
        private void ImageHelp_Click(object sender, EventArgs e)
        {
            FragmentTransaction ft = FragmentManager.BeginTransaction();
            //Remove fragment else it will crash as it is already added to backstack
            Fragment prev = FragmentManager.FindFragmentByTag("dialog");

            if (prev != null)
            {
                ft.Remove(prev);
            }
            ft.AddToBackStack(null);
            // Create and show the dialog.
            DialogFragment1 newFragment = DialogFragment1.NewInstance(null);

            //No title
            newFragment.SetStyle(DialogFragmentStyle.NoTitle, 0);
            //Add fragment
            newFragment.Show(ft, "dialog");
        }