{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

AutofillType

@ExperimentalComposeUiApi
public enum AutofillType extends Enum

java.lang.Object
   ↳ kotlin.Enum
     ↳ androidx.compose.ui.autofill.AutofillType

Autofill type information.

Autofill services use the AutofillType to determine what value to use to autofill fields associated with this type. If the AutofillType is not specified, the autofill services have to use heuristics to determine the right value to use while autofilling the corresponding field.

Summary

Enum Values

AddressAuxiliaryDetails

Indicates that the associated component can be aufofilled with auxiliary address details.

AddressCountry

Indicates that the associated component can be aufofilled with a country name/code.

AddressLocality

Indicates that the associated component can be aufofilled with an address locality (city/town).

AddressRegion

Indicates that the associated component can be aufofilled with a region/state.

AddressStreet

Indicates that the associated component can be aufofilled with a street address.

BirthDateDay

Indicates that the associated component can be aufofilled with a birth day(of the month).

BirthDateFull

Indicates that the associated component can be aufofilled with a full birth date.

BirthDateMonth

Indicates that the associated component can be aufofilled with a birth day(of the month).

BirthDateYear

Indicates that the associated component can be aufofilled with a birth year.

CreditCardExpirationDate

Indicates that the associated component can be aufofilled with a credit card expiration date.

CreditCardExpirationDay

Indicates that the associated component can be aufofilled with a credit card expiration day.

CreditCardExpirationMonth

Indicates that the associated component can be aufofilled with a credit card expiration month.

CreditCardExpirationYear

Indicates that the associated component can be aufofilled with a credit card expiration year.

CreditCardNumber

Indicates that the associated component can be aufofilled with a credit card number.

CreditCardSecurityCode

Indicates that the associated component can be aufofilled with a credit card security code.

EmailAddress

Indicates that the associated component can be aufofilled with an email address.

Gender

Indicates that the associated component can be aufofilled with a gender.

NewPassword

Indicates that the associated component can be interpreted as a newly created password for save/update.

NewUsername

Indicates that the associated component can be interpreted as a newly created username for save/update.

Password

Indicates that the associated component can be aufofilled with a password.

PersonFirstName

Indicates that the associated component can be aufofilled with a person's first/given name.

PersonFullName

Indicates that the associated component can be aufofilled with a person's full name.

PersonLastName

Indicates that the associated component can be aufofilled with a person's last/family name.

PersonMiddleInitial

Indicates that the associated component can be aufofilled with a person's middle initial.

PersonMiddleName

Indicates that the associated component can be aufofilled with a person's middle name.

PersonNamePrefix

Indicates that the associated component can be aufofilled with a person's name prefix.

PersonNameSuffix

Indicates that the associated component can be aufofilled with a person's name suffix.

PhoneCountryCode

Indicates that the associated component can be aufofilled with a phone number's country code.

PhoneNumber

Indicates that the associated component can be aufofilled with a phone number with country code.

PhoneNumberDevice

Indicates that the associated component can be aufofilled with the current device's phone number usually for Sign Up / OTP flows.

PhoneNumberNational

Indicates that the associated component can be aufofilled with a phone number without country code.

PostalAddress

Indicates that the associated component can be aufofilled with a postal address.

PostalCode

Indicates that the associated component can be aufofilled with a postal code.

PostalCodeExtended

Indicates that the associated component can be aufofilled with an extended ZIP/POSTAL code.

SmsOtpCode

Indicates that the associated component can be aufofilled with a SMS One Time Password (OTP).

Username

Indicates that the associated component can be aufofilled with a username.

Public methods

final @NonNull EnumEntries<@NonNull AutofillType>

Autofill type information.

final @NonNull AutofillType

Returns the enum constant of this type with the specified name.

final @NonNull AutofillType[]

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

AddressAuxiliaryDetails

@ExperimentalComposeUiApi
AutofillType AutofillType.AddressAuxiliaryDetails

Indicates that the associated component can be aufofilled with auxiliary address details.

AddressCountry

@ExperimentalComposeUiApi
AutofillType AutofillType.AddressCountry

Indicates that the associated component can be aufofilled with a country name/code.

AddressLocality

@ExperimentalComposeUiApi
AutofillType AutofillType.AddressLocality

Indicates that the associated component can be aufofilled with an address locality (city/town).

AddressRegion

@ExperimentalComposeUiApi
AutofillType AutofillType.AddressRegion

Indicates that the associated component can be aufofilled with a region/state.

AddressStreet

@ExperimentalComposeUiApi
AutofillType AutofillType.AddressStreet

Indicates that the associated component can be aufofilled with a street address.

BirthDateDay

@ExperimentalComposeUiApi
AutofillType AutofillType.BirthDateDay

Indicates that the associated component can be aufofilled with a birth day(of the month).

BirthDateFull

@ExperimentalComposeUiApi
AutofillType AutofillType.BirthDateFull

Indicates that the associated component can be aufofilled with a full birth date.

BirthDateMonth

@ExperimentalComposeUiApi
AutofillType AutofillType.BirthDateMonth

Indicates that the associated component can be aufofilled with a birth day(of the month).

BirthDateYear

@ExperimentalComposeUiApi
AutofillType AutofillType.BirthDateYear

Indicates that the associated component can be aufofilled with a birth year.

CreditCardExpirationDate

@ExperimentalComposeUiApi
AutofillType AutofillType.CreditCardExpirationDate

Indicates that the associated component can be aufofilled with a credit card expiration date.

CreditCardExpirationDay

@ExperimentalComposeUiApi
AutofillType AutofillType.CreditCardExpirationDay

Indicates that the associated component can be aufofilled with a credit card expiration day.

CreditCardExpirationMonth

@ExperimentalComposeUiApi
AutofillType AutofillType.CreditCardExpirationMonth

Indicates that the associated component can be aufofilled with a credit card expiration month.

CreditCardExpirationYear

@ExperimentalComposeUiApi
AutofillType AutofillType.CreditCardExpirationYear

Indicates that the associated component can be aufofilled with a credit card expiration year.

CreditCardNumber

@ExperimentalComposeUiApi
AutofillType AutofillType.CreditCardNumber

Indicates that the associated component can be aufofilled with a credit card number.

CreditCardSecurityCode

@ExperimentalComposeUiApi
AutofillType AutofillType.CreditCardSecurityCode

Indicates that the associated component can be aufofilled with a credit card security code.

EmailAddress

@ExperimentalComposeUiApi
AutofillType AutofillType.EmailAddress

Indicates that the associated component can be aufofilled with an email address.

Gender

@ExperimentalComposeUiApi
AutofillType AutofillType.Gender

Indicates that the associated component can be aufofilled with a gender.

NewPassword

@ExperimentalComposeUiApi
AutofillType AutofillType.NewPassword

Indicates that the associated component can be interpreted as a newly created password for save/update.

NewUsername

@ExperimentalComposeUiApi
AutofillType AutofillType.NewUsername

Indicates that the associated component can be interpreted as a newly created username for save/update.

Password

@ExperimentalComposeUiApi
AutofillType AutofillType.Password

Indicates that the associated component can be aufofilled with a password.

PersonFirstName

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonFirstName

Indicates that the associated component can be aufofilled with a person's first/given name.

PersonFullName

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonFullName

Indicates that the associated component can be aufofilled with a person's full name.

PersonLastName

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonLastName

Indicates that the associated component can be aufofilled with a person's last/family name.

PersonMiddleInitial

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonMiddleInitial

Indicates that the associated component can be aufofilled with a person's middle initial.

PersonMiddleName

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonMiddleName

Indicates that the associated component can be aufofilled with a person's middle name.

PersonNamePrefix

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonNamePrefix

Indicates that the associated component can be aufofilled with a person's name prefix.

PersonNameSuffix

@ExperimentalComposeUiApi
AutofillType AutofillType.PersonNameSuffix

Indicates that the associated component can be aufofilled with a person's name suffix.

PhoneCountryCode

@ExperimentalComposeUiApi
AutofillType AutofillType.PhoneCountryCode

Indicates that the associated component can be aufofilled with a phone number's country code.

PhoneNumber

@ExperimentalComposeUiApi
AutofillType AutofillType.PhoneNumber

Indicates that the associated component can be aufofilled with a phone number with country code.

Example: +1 123-456-7890

PhoneNumberDevice

@ExperimentalComposeUiApi
AutofillType AutofillType.PhoneNumberDevice

Indicates that the associated component can be aufofilled with the current device's phone number usually for Sign Up / OTP flows.

PhoneNumberNational

@ExperimentalComposeUiApi
AutofillType AutofillType.PhoneNumberNational

Indicates that the associated component can be aufofilled with a phone number without country code.

PostalAddress

@ExperimentalComposeUiApi
AutofillType AutofillType.PostalAddress

Indicates that the associated component can be aufofilled with a postal address.

PostalCode

@ExperimentalComposeUiApi
AutofillType AutofillType.PostalCode

Indicates that the associated component can be aufofilled with a postal code.

PostalCodeExtended

@ExperimentalComposeUiApi
AutofillType AutofillType.PostalCodeExtended

Indicates that the associated component can be aufofilled with an extended ZIP/POSTAL code.

Example: In forms that split the U.S. ZIP+4 Code with nine digits 99999-9999 into two fields annotate the delivery route code with this hint.

SmsOtpCode

@ExperimentalComposeUiApi
AutofillType AutofillType.SmsOtpCode

Indicates that the associated component can be aufofilled with a SMS One Time Password (OTP).

TODO(b/153386346): Support use-case where you specify the start and end index of the OTP.

Username

@ExperimentalComposeUiApi
AutofillType AutofillType.Username

Indicates that the associated component can be aufofilled with a username.

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull AutofillTypegetEntries()

Autofill type information.

Autofill services use the AutofillType to determine what value to use to autofill fields associated with this type. If the AutofillType is not specified, the autofill services have to use heuristics to determine the right value to use while autofilling the corresponding field.

valueOf

public final @NonNull AutofillType valueOf(@NonNull String value)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

public final @NonNull AutofillType[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.