Interface CefriumPickerHandler
public interface CefriumPickerHandler
Shows the pickers of
<select>, the date and time inputs and
<input type=color> for an off-screen browser. A browser on a surface
shows Chromium's own dialogs; an off-screen one has no window for them, so
it uses this handler, or the default dialogs on the activity given to
CefriumBrowser.setDialogActivity(Activity). With neither, the picker is
cancelled and the page keeps its value.
Called on the main thread. Each method returns true if it will answer through the callback, exactly once; false falls back to the default.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAnswers aonShowColor(int, int[], CefriumPickerHandler.ColorCallback)call.static interfacestatic interfacestatic final classOne entry of a<select>. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated.static final intDeprecated. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanonShowColor(int color, int[] suggestions, CefriumPickerHandler.ColorCallback callback) default booleanonShowDateTime(int type, double value, double minimum, double maximum, double step, CefriumPickerHandler.DateTimeCallback callback) default booleanonShowDateTime(CefriumDateTimeInputType type, double value, double minimum, double maximum, double step, CefriumPickerHandler.DateTimeCallback callback) A date or time input wants its picker.default booleanonShowSelect(CefriumPickerHandler.SelectItem[] items, int selected, boolean multiple, CefriumPickerHandler.SelectCallback callback)
-
Field Details
-
DATE
Deprecated.<input type=date>.- See Also:
-
DATE_TIME_LOCAL
Deprecated.<input type=datetime-local>.- See Also:
-
MONTH
Deprecated.<input type=month>.- See Also:
-
TIME
Deprecated.<input type=time>.- See Also:
-
WEEK
Deprecated.<input type=week>.- See Also:
-
-
Method Details
-
onShowSelect
default boolean onShowSelect(CefriumPickerHandler.SelectItem[] items, int selected, boolean multiple, CefriumPickerHandler.SelectCallback callback) - Parameters:
items- the entries, including group labels and separators.selected- the index of the selected item, or -1.multiple- true for<select multiple>: answer with every checked item.
-
onShowDateTime
@Deprecated default boolean onShowDateTime(int type, double value, double minimum, double maximum, double step, CefriumPickerHandler.DateTimeCallback callback) Deprecated. -
onShowDateTime
default boolean onShowDateTime(CefriumDateTimeInputType type, double value, double minimum, double maximum, double step, CefriumPickerHandler.DateTimeCallback callback) A date or time input wants its picker.- Parameters:
value- as Chromium represents it: forCefriumDateTimeInputType.TIMEmilliseconds since midnight, forCefriumDateTimeInputType.MONTHmonths since January 1970, otherwise milliseconds since 1970 UTC. NaN when the input is empty.minimum,maximumandstepuse the same units.
-
onShowColor
default boolean onShowColor(int color, int[] suggestions, CefriumPickerHandler.ColorCallback callback) - Parameters:
color- the current colour, ARGB.suggestions- the colours of the input's<datalist>.
-
CefriumDateTimeInputType.