Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.ColorPrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.ColorPrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.ColorPrompt
extends GeckoSession.PromptDelegate.BasePrompt
ColorPrompt contains the information necessary to represent a prompt for color input
generated by content.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe default value supplied by content.final String[]The predefined values by <datalist> elementFields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedColorPrompt(String id, String title, String defaultValue, String[] predefinedValues, GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a ColorPrompt for color input generated by content. -
Method Summary
Modifier and TypeMethodDescriptionConfirms the prompt and passes the color value back to content.Methods inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
confirm, dismiss, getDelegate, isComplete, setDelegate
-
Field Details
-
defaultValue
The default value supplied by content. -
predefinedValues
The predefined values by <datalist> element
-
-
Constructor Details
-
ColorPrompt
protected ColorPrompt(@NonNull String id, @Nullable String title, @Nullable String defaultValue, @Nullable String[] predefinedValues, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a ColorPrompt for color input generated by content.- Parameters:
id- the unique identifier for this prompttitle- the title text for the prompt; may be nulldefaultValue- the default color value supplied by content; may be nullpredefinedValues- the array of predefined colors from <datalist> may be nullobserver- the observer to notify when the prompt is completed
-
-
Method Details
-
confirm
Confirms the prompt and passes the color value back to content.- Parameters:
color- A String representing the color to be returned to content.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-