# AutofillType

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/autofill/AutofillType.kt+class:androidx.compose.ui.autofill.AutofillType) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0) Common/AllAndroid/JVM
- Cmn

  ```
  enum AutofillType : Enum<AutofillType>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)\<[AutofillType](https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType)\> ||
|   | ↳ | [androidx.compose.ui.autofill.AutofillType](https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType) |

*** ** * ** ***

> [!CAUTION]
> **This enum is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Autofill type information.

Autofill services use the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType` to determine what value to use to autofill fields associated with this type. If the `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType` is not specified, the autofill services have to use heuristics to determine the right value to use while auto-filling the corresponding field.

This has been deprecated in favor of a new semantics based API. Use `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsProperties#ContentType()` instead.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#AddressAuxiliaryDetails` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#AddressCountry` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#AddressLocality` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#AddressRegion` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#AddressStreet` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#BirthDateDay` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#BirthDateFull` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#BirthDateMonth` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#BirthDateYear` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#CreditCardExpirationDate` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#CreditCardExpirationDay` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#CreditCardExpirationMonth` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#CreditCardExpirationYear` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#CreditCardNumber` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#CreditCardSecurityCode` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#EmailAddress` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#Gender` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#NewPassword` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#NewUsername` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#Password` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonFirstName` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonFullName` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonLastName` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonMiddleInitial` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonMiddleName` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonNamePrefix` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PersonNameSuffix` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PhoneCountryCode` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PhoneNumber` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PhoneNumberDevice` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PhoneNumberNational` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PostalAddress` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PostalCode` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#PostalCodeExtended` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#SmsOtpCode` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#Username` | **This enum value is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType` | `[valueOf](https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#valueOf(kotlin.String))(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` **This function is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType>` | `[values](https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#values())()` **This function is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType>` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#entries()` **This property is deprecated.** Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead. | Cmn |

## Enum Values

### AddressAuxiliaryDetails

```
val AutofillType.AddressAuxiliaryDetails: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with auxiliary address details.

### AddressCountry

```
val AutofillType.AddressCountry: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a country name/code.

### AddressLocality

```
val AutofillType.AddressLocality: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### AddressRegion

```
val AutofillType.AddressRegion: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a region/state.

### AddressStreet

```
val AutofillType.AddressStreet: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a street address.

### BirthDateDay

```
val AutofillType.BirthDateDay: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### BirthDateFull

```
val AutofillType.BirthDateFull: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a full birth date.

### BirthDateMonth

```
val AutofillType.BirthDateMonth: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a birth month.

### BirthDateYear

```
val AutofillType.BirthDateYear: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a birth year.

### CreditCardExpirationDate

```
val AutofillType.CreditCardExpirationDate: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a credit card expiration date.

### CreditCardExpirationDay

```
val AutofillType.CreditCardExpirationDay: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a credit card expiration day.

### CreditCardExpirationMonth

```
val AutofillType.CreditCardExpirationMonth: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a credit card expiration month.

### CreditCardExpirationYear

```
val AutofillType.CreditCardExpirationYear: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a credit card expiration year.

### CreditCardNumber

```
val AutofillType.CreditCardNumber: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a credit card number.

### CreditCardSecurityCode

```
val AutofillType.CreditCardSecurityCode: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a credit card security code.

### EmailAddress

```
val AutofillType.EmailAddress: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with an email address.

### Gender

```
val AutofillType.Gender: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a gender.

### NewPassword

```
val AutofillType.NewPassword: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### NewUsername

```
val AutofillType.NewUsername: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### Password

```
val AutofillType.Password: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a password.

### PersonFirstName

```
val AutofillType.PersonFirstName: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### PersonFullName

```
val AutofillType.PersonFullName: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a person's full name.

### PersonLastName

```
val AutofillType.PersonLastName: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### PersonMiddleInitial

```
val AutofillType.PersonMiddleInitial: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a person's middle initial.

### PersonMiddleName

```
val AutofillType.PersonMiddleName: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a person's middle name.

### PersonNamePrefix

```
val AutofillType.PersonNamePrefix: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a person's name prefix.

### PersonNameSuffix

```
val AutofillType.PersonNameSuffix: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a person's name suffix.

### PhoneCountryCode

```
val AutofillType.PhoneCountryCode: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### PhoneNumber

```
val AutofillType.PhoneNumber: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a phone number with country code.

Example: +1 123-456-7890

### PhoneNumberDevice

```
val AutofillType.PhoneNumberDevice: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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

### PhoneNumberNational

```
val AutofillType.PhoneNumberNational: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a phone number without country code.

### PostalAddress

```
val AutofillType.PostalAddress: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a postal address.

### PostalCode

```
val AutofillType.PostalCode: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a postal code.

### PostalCodeExtended

```
val AutofillType.PostalCodeExtended: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled 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

```
val AutofillType.SmsOtpCode: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled 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

```
val AutofillType.Username: AutofillType
```

> [!CAUTION]
> **This enum value is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Indicates that the associated component can be auto-filled with a username.

## Public functions

### valueOf

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
fun [valueOf](https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#valueOf(kotlin.String))(value: String): AutofillType
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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 |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
fun [values](https://developer.android.com/reference/kotlin/androidx/compose/ui/autofill/AutofillType#values())(): Array<AutofillType>
```

> [!CAUTION]
> **This function is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

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.

The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using `entries` property as a more efficient alternative returning an immutable list of enum entries.

## Public properties

### entries

Cmn

```
val entries: EnumEntries<AutofillType>
```

> [!CAUTION]
> **This property is deprecated.**   
> Use the new semantics-based API and androidx.compose.ui.autofill.ContentType instead.

Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared.