Interface

ViewRootForTest

The marker interface to be implemented by the View backing the composition.

Source set: Android
public interface ViewRootForTest : RootForTest

The marker interface to be implemented by the View backing the composition. To be used in tests.

Properties

view

Source set: Android
public val view: View

The view backing this Owner.

isLifecycleInResumedState

Source set: Android
public val isLifecycleInResumedState: Boolean

Returns true when the associated LifecycleOwner is in the resumed state

hasPendingMeasureOrLayout

Source set: Android
public val hasPendingMeasureOrLayout: Boolean

Whether the Owner has pending layout work.

Functions

invalidateDescendants

Source set: Android
public fun invalidateDescendants()

Called to invalidate the Android View sub-hierarchy handled by this View.

Members

Companion

Source set: Android
public companion object

Properties

onViewCreatedCallback

Source set: Android
@VisibleForTesting public var onViewCreatedCallback: ((ViewRootForTest) -> Unit)? = null

Called after a View implementing ViewRootForTest is created. Used by AndroidComposeTestRule to keep track of all attached ComposeViews. Not to be set or used by any other component.

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: