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

            fragment.Arguments = bundle;
            return(fragment);
        }
        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");
        }