{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ViewRootForInspector

public interface ViewRootForInspector


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

Summary

Public methods

default AbstractComposeView

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

default View

Return the top view initialized from Compose.

Public methods

getSubCompositionView

default AbstractComposeView getSubCompositionView()

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.

getViewRoot

default View getViewRoot()

Return the top view initialized from Compose.

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