---
title: "ViewRootForInspector"
description: "The marker interface to be implemented by [View]s that are initialized from Compose. Examples
are: DialogWrapper, PopupLayout, ViewFactoryHolder. To be used by the inspector."
type: "interface"
---

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


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>



```kotlin
@JvmDefaultWithCompatibility
interface ViewRootForInspector
```


The marker interface to be implemented by `View`s that are initialized from Compose. Examples
are: DialogWrapper, PopupLayout, ViewFactoryHolder. To be used by the inspector.


## Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
val subCompositionView: AbstractComposeView?
```


Return the `AbstractComposeView` if this is creating for a sub composition.

This allows the inspector to add the creating compose nodes to the sub composition.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
val viewRoot: View?
```


Return the top view initialized from Compose.

This allows the inspector to place the view under the correct compose node.




