---
title: "ContentType"
description: "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 `contentType`s 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."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
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 `contentType`s 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.



