Function

ContentType

Create a custom ContentType with contentHint.

ContentType

Source set: Android
public fun ContentType(contentHint: String): ContentType

Create a custom ContentType with contentHint.

This creates a ContentType with the parameter contentHint passed in. This API can be used if the Autofill hint is not present in the list of contentTypes provided by Compose.

For example, ContentType(androidx.autofill.HintConstants.AUTOFILL_HINT_FLIGHT_CONFIRMATION_CODE) can be used to create a new flight confirmation code hint.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: