public interface TimepointLimiter
extends android.os.Parcelable
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAmDisabled()
isAmDisabled ndicates whether any times before midday are selectable
This method is called when the picker is initialized or when the user clicks / taps the AM or
PM buttons.
|
boolean |
isOutOfRange(Timepoint point,
int index,
Timepoint.TYPE resolution)
isOutOfRange indicates whether a particular timepoint is selectable or not
It is called multiple times in the rendering path, so it should be fast
The index parameter indicates which picker is currently visible.
|
boolean |
isPmDisabled()
isPmDisabled ndicates whether any times after midday are selectable
This method is called when the picker is initialized or when the user clicks / taps the AM or
PM buttons.
|
Timepoint |
roundToNearest(Timepoint time,
Timepoint.TYPE type,
Timepoint.TYPE resolution)
roundToNearest returns the nearest selectable timepoint given a particular input
It is called whenever the user touches the screen, which means it can get called very
frequently if the user performs a drag operation
Both the currently showing picker and the overall resolution are passed in, for similar
reasons as in isOutOfRange
|
boolean isOutOfRange(Timepoint point, int index, Timepoint.TYPE resolution)
point - A timepoint to validateindex - The currently showing picker (hour, minute, second)resolution - The overall resolution of the pickerboolean isAmDisabled()
boolean isPmDisabled()
Timepoint roundToNearest(Timepoint time, Timepoint.TYPE type, Timepoint.TYPE resolution)
time - the proposed selectiontype - the currently showing picker (hour, minute, second)resolution - the overall resolution of the picker