Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.TextPrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.TextPrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.TextPrompt
extends GeckoSession.PromptDelegate.BasePrompt
TextPrompt contains the information necessary to represent a Javascript prompt() call from
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 for the text field; may be null.final StringThe message to be displayed with this prompt; may be null.Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTextPrompt(String id, String title, String message, String defaultValue, GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a TextPrompt for JavaScript prompt() dialogs. -
Method Summary
Modifier and TypeMethodDescriptionConfirms this prompt, returning the input text to content.Methods inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
confirm, dismiss, getDelegate, isComplete, setDelegate
-
Field Details
-
message
The message to be displayed with this prompt; may be null. -
defaultValue
The default value for the text field; may be null.
-
-
Constructor Details
-
TextPrompt
protected TextPrompt(@NonNull String id, @Nullable String title, @Nullable String message, @Nullable String defaultValue, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a TextPrompt for JavaScript prompt() dialogs.- Parameters:
id- the unique identifier for this prompttitle- optional title text; may be nullmessage- the message to display; may be nulldefaultValue- the default input value; may be nullobserver- observer to notify when the prompt is completed
-
-
Method Details
-
confirm
Confirms this prompt, returning the input text to content.- Parameters:
text- A String containing the text input given by the user.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-