Esempio n. 1
0
        /// <summary>
        /// Like show() but allows the commit to be executed after an activity's state is saved. This
        /// is dangerous because the commit can be lost if the activity needs to later be restored from
        /// its state, so this should only be used for cases where it is okay for the UI state to change
        /// unexpectedly on the user.
        /// </summary>
        public virtual DialogFragment ShowAllowingStateLoss()
        {
            fragment = Create();
            fragment.ShowAllowingStateLoss(mFragmentManager, mTag);

            return(fragment);
        }
Esempio n. 2
0
        public virtual DialogFragment Show()
        {
            fragment = Create();
            fragment.Show(mFragmentManager, mTag);

            return(fragment);
        }
Esempio n. 3
0
        public BaseDialogFragment Create()
        {
            Bundle args = PrepareArguments();

            BaseDialogFragment fragment = (BaseDialogFragment)Fragment.Instantiate(mContext, mClass.Name, args);

            args.PutBoolean(ARG_CANCELABLE_ON_TOUCH_OUTSIDE, mCancelableOnTouchOutside);

            args.PutBoolean(ARG_USE_DARK_THEME, mUseDarkTheme);

            if (mTargetFragment != null)
            {
                fragment.SetTargetFragment(mTargetFragment, mRequestCode);
            }
            else
            {
                args.PutInt(ARG_REQUEST_CODE, mRequestCode);
            }
            fragment.Cancelable = mCancelable;

            return(fragment);
        }