Beispiel #1
0
        public void Show()
        {
            if (mListener == null)
            {
                throw new ArgumentNullException("Attempting to bind null listener to SlideDateTimePicker");
            }

            if (InitialDate == null)
            {
                InitialDate = DateTime.Now;
            }

            SlideDateTimeDialogFragment dialogFragmen =
                SlideDateTimeDialogFragment.NewInstance(mListener,
                                                        InitialDate, MinDate, MaxDate,
                                                        IsClientSpecified24HourTime,
                                                        Is24HourTime, mTheme, IndicatorColor);

            dialogFragmen.Show(mFragmentManager,
                               SlideDateTimeDialogFragment.TAG_SLIDE_DATE_TIME_DIALOG_FRAGMENT);
        }
        public static SlideDateTimeDialogFragment NewInstance(SlideDateTimeListener listener,
                                                              DateTime initialDate, DateTime minDate, DateTime maxDate, bool isClientSpecified24HourTime,
                                                              bool is24HourTime, int theme, int indicatorColor)
        {
            mListener = listener;

            SlideDateTimeDialogFragment dialogFragment = new SlideDateTimeDialogFragment();

            Bundle bundle = new Bundle();

            bundle.PutLong("initialDate", initialDate.Ticks);
            bundle.PutLong("minDate", minDate.Ticks);
            bundle.PutLong("maxDate", maxDate.Ticks);
            bundle.PutBoolean("isClientSpecified24HourTime", isClientSpecified24HourTime);
            bundle.PutBoolean("is24HourTime", is24HourTime);
            bundle.PutInt("theme", theme);
            bundle.PutInt("indicatorColor", indicatorColor);
            dialogFragment.Arguments = bundle;

            return(dialogFragment);
        }
        public static SlideDateTimeDialogFragment NewInstance(SlideDateTimeListener listener,
            DateTime initialDate, DateTime minDate, DateTime maxDate, bool isClientSpecified24HourTime,
            bool is24HourTime, int theme, int indicatorColor)
        {
            mListener = listener;

            SlideDateTimeDialogFragment dialogFragment = new SlideDateTimeDialogFragment();

            Bundle bundle = new Bundle();
            bundle.PutLong("initialDate", initialDate.Ticks);
            bundle.PutLong("minDate", minDate.Ticks);
            bundle.PutLong("maxDate", maxDate.Ticks);
            bundle.PutBoolean("isClientSpecified24HourTime", isClientSpecified24HourTime);
            bundle.PutBoolean("is24HourTime", is24HourTime);
            bundle.PutInt("theme", theme);
            bundle.PutInt("indicatorColor", indicatorColor);
            dialogFragment.Arguments = bundle;

            return dialogFragment;
        }
Beispiel #4
0
 public ViewPagerAdapter(FragmentManager fm, SlideDateTimeDialogFragment dialogFragment)
     : base(fm)
 {
     this.mDialogFragment = dialogFragment;
 }