Package org.mozilla.geckoview
Class Autocomplete.AddressStructure.Field.SelectField
Object
org.mozilla.geckoview.Autocomplete.AddressStructure.Field.SelectField
- All Implemented Interfaces:
Autocomplete.AddressStructure.Field
- Enclosing interface:
- Autocomplete.AddressStructure.Field
public static class Autocomplete.AddressStructure.Field.SelectField
extends Object
implements Autocomplete.AddressStructure.Field
A select (dropdown) input field with a constrained set of options (e.g., state, country).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA single option in a SelectField.Nested classes/interfaces inherited from interface org.mozilla.geckoview.Autocomplete.AddressStructure.Field
Autocomplete.AddressStructure.Field.SelectField, Autocomplete.AddressStructure.Field.TextField -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe default value to use if one has not already been selectedThe default value to use if one has not already been selected -
Constructor Summary
ConstructorsConstructorDescriptionSelectField(String id, String localizationKey, String defaultValue, List<Autocomplete.AddressStructure.Field.SelectField.Option> options) Constructor for SelectField. -
Method Summary
Modifier and TypeMethodDescriptiongetId()The ID for the field.Returns the localization key used to obtain a human-readable label for this field.
-
Field Details
-
defaultValue
The default value to use if one has not already been selected -
options
The default value to use if one has not already been selected
-
-
Constructor Details
-
SelectField
public SelectField(String id, String localizationKey, @NonNull String defaultValue, @NonNull List<Autocomplete.AddressStructure.Field.SelectField.Option> options) Constructor for SelectField.- Parameters:
id- The id for this fieldlocalizationKey- The localization key for this fielddefaultValue- The default value to use if the user hasn't selected an optionoptions- a list of Options that a user can select
-
-
Method Details
-
getId
Description copied from interface:Autocomplete.AddressStructure.FieldThe ID for the field. Maps 1:1 to a field on an Address.- Specified by:
getIdin interfaceAutocomplete.AddressStructure.Field- Returns:
- the id.
-
getLocalizationKey
Description copied from interface:Autocomplete.AddressStructure.FieldReturns the localization key used to obtain a human-readable label for this field.This key allows the embedding application to look up the display string in its own resources (e.g., `autofill-address-name`). It is not a user-visible string.
- Specified by:
getLocalizationKeyin interfaceAutocomplete.AddressStructure.Field- Returns:
- the localization key.
-