# ViewTreeHostDefaultKey

Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/ViewTreeHostDefaultKey.android.kt+class:androidx.compose.runtime.ViewTreeHostDefaultKey) Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.11.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- android

  ```
  interface ViewTreeHostDefaultKey<T : Any?> : HostDefaultKey<T>
  ```

*** ** * ** ***

An Android-specific `https://developer.android.com/reference/kotlin/androidx/compose/runtime/HostDefaultKey` that identifies values stored within the `https://developer.android.com/reference/android/view/View.html` hierarchy using Resource ID tags.

This key is specifically designed for use with `ViewTreeHostDefaultProvider`. It allows the runtime to resolve dependencies by traversing upward through the view tree---including across disjoint parents like Dialogs and Popups---to find a value associated with the provided `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ViewTreeHostDefaultKey#tagKey()`.

| Parameters |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | The type of the value associated with this key. |

## Summary

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/ViewTreeHostDefaultKey#tagKey()` The Android Resource ID used as the tag key to retrieve the value from a View's tags. | android |

## Public properties

### tagKey

android Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.11.0)

```
val tagKey: Int
```

The Android Resource ID used as the tag key to retrieve the value from a View's tags.