public static ShutterDialogFragment NewInstance(Bundle bundle)
        {
            var fragment = new ShutterDialogFragment {
                Arguments = bundle
            };

            return(fragment);
        }
Пример #2
0
        private void CreateShutterDialog(int position)
        {
            var ft = ChildFragmentManager.BeginTransaction();
            //Remove fragment else it will crash as it is already added to backstack
            var prev = ChildFragmentManager.FindFragmentByTag("shutterDialog");

            if (prev != null)
            {
                ft.Remove(prev);
            }

            ft.AddToBackStack(null);

            // Create and show the dialog.
            var bundle = new Bundle();

            bundle.PutString("floor", _items[position].Floor);
            bundle.PutString("descr", _items[position].Description);
            var newFragment = ShutterDialogFragment.NewInstance(bundle);

            //Add fragment
            newFragment.Show(ft, "shutterDialog");
        }