コード例 #1
0
        /**
         * Shows the dialog to the user. Make sure to call
         * {@link #setListener()} before calling this.
         */
        public void Show()
        {
            if (_listener == null)
            {
                throw new NullPointerException(
                          "Attempting to bind null listener to SlideDateTimePicker");
            }

            if (_initialDate == null)
            {
                SetInitialDate(new Date());
            }

            SlideDateTimeDialogFragment dialogFragment = SlideDateTimeDialogFragment.NewInstance(_listener, _initialDate, _minDate, _maxDate, _isClientSpecified24HourTime, _is24HourTime, _theme, _indicatorColor);

            dialogFragment.Show(_fragmentManager, SlideDateTimeDialogFragment._tagSlideDateTimeDialogFragment);
        }
コード例 #2
0
		/**
     * <p>Return a new instance of {@code SlideDateTimeDialogFragment} with its bundle
     * filled with the incoming arguments.</p>
     *
     * <p>Called by {@link SlideDateTimePicker#show()}.</p>
     *
     * @param listener
     * @param initialDate
     * @param minDate
     * @param maxDate
     * @param isClientSpecified24HourTime
     * @param is24HourTime
     * @param theme
     * @param indicatorColor
     * @return
     */
		public static SlideDateTimeDialogFragment NewInstance(SlideDateTimeListener Listener,Date InitialDate, Date MinDate, Date MaxDate, bool IsClientSpecified24HourTime,bool Is24HourTime, int Theme, int IndicatorColor)
		{
			_listener = Listener;

			// Create a new instance of SlideDateTimeDialogFragment
			SlideDateTimeDialogFragment dialogFragment = new SlideDateTimeDialogFragment();

			// Store the arguments and attach the bundle to the fragment
			Bundle bundle = new Bundle();
			bundle.PutSerializable("initialDate", InitialDate);
			bundle.PutSerializable("minDate", MinDate);
			bundle.PutSerializable("maxDate", MaxDate);
			bundle.PutBoolean("isClientSpecified24HourTime", IsClientSpecified24HourTime);
			bundle.PutBoolean("is24HourTime", Is24HourTime);
			bundle.PutInt("theme", Theme);
			bundle.PutInt("indicatorColor", IndicatorColor);
			dialogFragment.Arguments=bundle;

			// Return the fragment with its bundle
			return dialogFragment;
		}
コード例 #3
0
        /**
         * <p>Return a new instance of {@code SlideDateTimeDialogFragment} with its bundle
         * filled with the incoming arguments.</p>
         *
         * <p>Called by {@link SlideDateTimePicker#show()}.</p>
         *
         * @param listener
         * @param initialDate
         * @param minDate
         * @param maxDate
         * @param isClientSpecified24HourTime
         * @param is24HourTime
         * @param theme
         * @param indicatorColor
         * @return
         */
        public static SlideDateTimeDialogFragment NewInstance(SlideDateTimeListener Listener, Date InitialDate, Date MinDate, Date MaxDate, bool IsClientSpecified24HourTime, bool Is24HourTime, int Theme, int IndicatorColor)
        {
            _listener = Listener;

            // Create a new instance of SlideDateTimeDialogFragment
            SlideDateTimeDialogFragment dialogFragment = new SlideDateTimeDialogFragment();

            // Store the arguments and attach the bundle to the fragment
            Bundle bundle = new Bundle();

            bundle.PutSerializable("initialDate", InitialDate);
            bundle.PutSerializable("minDate", MinDate);
            bundle.PutSerializable("maxDate", MaxDate);
            bundle.PutBoolean("isClientSpecified24HourTime", IsClientSpecified24HourTime);
            bundle.PutBoolean("is24HourTime", Is24HourTime);
            bundle.PutInt("theme", Theme);
            bundle.PutInt("indicatorColor", IndicatorColor);
            dialogFragment.Arguments = bundle;

            // Return the fragment with its bundle
            return(dialogFragment);
        }
コード例 #4
0
 public ViewPagerAdapter(SlideDateTimeDialogFragment slideDateTimeDialogFragment, Android.Support.V4.App.FragmentManager fm) : base(fm)
 {
     this.slideDateTimeDialogFragment = slideDateTimeDialogFragment;
 }
コード例 #5
0
			public ViewPagerAdapter(SlideDateTimeDialogFragment slideDateTimeDialogFragment,Android.Support.V4.App.FragmentManager fm):base(fm)
			{
				this.slideDateTimeDialogFragment=slideDateTimeDialogFragment;
			}