-
Notifications
You must be signed in to change notification settings - Fork 409
SublimeOptions
Initial values for SublimePicker
are passed through SublimeOptions
.
Available options
-
setAnimateLayoutChanges(boolean animateLayoutChanges)
: provides layout animation using android.animation.LayoutTransition. The animations aren't great, but they do add a bit of fluidity to layout changes such as switching between pickers. Off by default. -
setPickerToShow(Picker picker)
: supplied picker will be shown whenSublimePicker
is launched. It is an error to pass this method a picker that has been deactivated. Defaults toPicker.DATE_PICKER
. So, if you deactivatePicker.DATE_PICKER
, call this method to clear the default. -
setDisplayOptions(int displayOptions)
: activate/deactivate picker(s) that you need/don't need. You can pass any combination ofSublimeOptions.ACTIVATE_DATE_PICKER
,SublimeOptions.ACTIVATE_TIME_PICKER
&SublimeOptions.ACTIVATE_RECURRENCE_PICKER
to this method. For example, to activate TimePicker & RecurrencePicker (but not DatePicker), use:mSublimeOptions.setDisplayOptions(SublimeOptions.ACTIVATE_TIME_PICKER | SublimeOptions.ACTIVATE_RECURRENCE_PICKER);
By default, all three pickers are active.
-
setDateParams(int year, int monthOfYear, int dayOfMonth)
: set initial date parameters -
setDateRange(long minDate, long maxDate)
: if you only need to set aminDate
(ormaxDate
), passLong.MIN_VALUE
for the other -
setTimeParams(int hourOfDay, int minute, boolean is24HourView)
: set initial time parameters -
setRecurrenceParams(String recurrenceRule)
: set recurrence rule