Google 致力于为黑人社区推动种族平等。查看具体举措

ViewRootForTest

interface ViewRootForTest : RootForTest
androidx.compose.ui.platform.ViewRootForTest

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

Summary

Public methods
abstract Unit

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

Inherited functions
Properties
abstract Boolean

Whether the Owner has pending layout work.

abstract Boolean

Returns true when the associated LifecycleOwner is in the resumed state

abstract View

The view backing this Owner.

Companion properties
(ViewRootForTest) -> Unit

Called after an View implementing ViewRootForTest is created.

Inherited properties

Public methods

invalidateDescendants

abstract fun invalidateDescendants(): Unit

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

Properties

hasPendingMeasureOrLayout

abstract val hasPendingMeasureOrLayout: Boolean

Whether the Owner has pending layout work.

isLifecycleInResumedState

abstract val isLifecycleInResumedState: Boolean

Returns true when the associated LifecycleOwner is in the resumed state

view

abstract val view: View

The view backing this Owner.

Companion properties

onViewCreatedCallback

var onViewCreatedCallback: (ViewRootForTest) -> Unit

Called after an 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.