Input content type on Android
Setting the content type for input fields helps user entering data. For example, an e-mail address and password can be autofilled by a password manager. When the content type has not been set, this might not be possible to do automatically.
On Android, you can set a content type by using the android:optimizeForAutoFill
property.
The following values are defined:
creditCardExpirationDate
: auto-fillcredit card expiration datecreditCardExpirationDay
: credit card expiration daycreditCardExpirationMonth
: credit card expiration monthcreditCardExpirationYear
: credit card expiration yearcreditCardNumber
: credit card numbercreditCardSecurityCode
: credit card security codeemailAddress
: email addressname
: namepassword
: passwordphone
: phone numberpostalAddress
: postal addresspostalCode
: postal codeusername
: username
Example of using autofillHints
: