Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.ChoicePrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.ChoicePrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.ChoicePrompt
extends GeckoSession.PromptDelegate.BasePrompt
ChoicePrompt contains the information necessary to display a menu or list prompt generated by
content.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static @interface
static class
Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer
-
Field Summary
Modifier and TypeFieldDescriptionAn array ofGeckoSession.PromptDelegate.ChoicePrompt.Choice
representing possible choices.final String
The message to be displayed with this prompt; may be null.final int
Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title
-
Constructor Summary
ModifierConstructorDescriptionprotected
ChoicePrompt
(String id, String title, String message, int type, GeckoSession.PromptDelegate.ChoicePrompt.Choice[] choices, GeckoSession.PromptDelegate.BasePrompt.Observer observer) -
Method Summary
Modifier and TypeMethodDescriptionConfirms this prompt with the string id of a single choice.Confirms this prompt with the string ids of multiple choicesconfirm
(GeckoSession.PromptDelegate.ChoicePrompt.Choice selectedChoice) Confirms this prompt with a single choice.confirm
(GeckoSession.PromptDelegate.ChoicePrompt.Choice[] selectedChoices) Confirms this prompt with multiple choices.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. -
type
public final int type -
choices
An array ofGeckoSession.PromptDelegate.ChoicePrompt.Choice
representing possible choices.
-
-
Constructor Details
-
ChoicePrompt
protected ChoicePrompt(@NonNull String id, @Nullable String title, @Nullable String message, int type, @NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[] choices, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer)
-
-
Method Details
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String selectedId) Confirms this prompt with the string id of a single choice.- Parameters:
selectedId
- The string ID of the selected choice.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponse
which can be used to complete theGeckoResult
associated with this prompt.
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull String[] selectedIds) Confirms this prompt with the string ids of multiple choices- Parameters:
selectedIds
- The string IDs of the selected choices.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponse
which can be used to complete theGeckoResult
associated with this prompt.
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice selectedChoice) Confirms this prompt with a single choice.- Parameters:
selectedChoice
- The selected choice.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponse
which can be used to complete theGeckoResult
associated with this prompt.
-
confirm
@UiThread @NonNull public GeckoSession.PromptDelegate.PromptResponse confirm(@NonNull GeckoSession.PromptDelegate.ChoicePrompt.Choice[] selectedChoices) Confirms this prompt with multiple choices.- Parameters:
selectedChoices
- The selected choices.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponse
which can be used to complete theGeckoResult
associated with this prompt.
-