Package-level declarations

Types

Link copied to clipboard

Android 层公开的渲染会话包装器。 Public Android-side wrapper around the core render session.

Link copied to clipboard

Android host 模块标记,用于暴露渲染会话和宿主桥接 API。 Android host marker for render session and host bridge APIs.

Functions

Link copied to clipboard
fun UiTreeBuilder.AndroidView(factory: (Context) -> View, update: (View) -> Unit = {}, key: Any? = null, modifier: Modifier = Modifier, onReset: (View) -> Unit? = null, onRelease: (View) -> Unit? = null, onCommit: (View) -> Unit? = null)

挂载一个 Android View 到声明式树中。 Mounts an Android View.

Link copied to clipboard
fun Modifier.nativeView(key: Any = Unit, configure: (View) -> Unit): Modifier

对已挂载的 Android View 直接应用可重放配置。 Applies replay-safe configuration directly to the mounted Android View.

Link copied to clipboard
fun renderInto(container: ViewGroup, debug: Boolean = false, debugTag: String = "ViewCompose", overlayHost: OverlayHost = OverlayHostDefaults.noOp, onRenderStats: (RenderStats) -> Unit? = null, onRenderResult: (RenderTreeResult) -> Unit? = null, onRenderFailure: (RenderFailure) -> Unit? = null, content: UiTreeBuilder.() -> Unit): RenderSession

将 UIFramework DSL 内容渲染到指定 Android ViewGroup。 Renders UIFramework DSL content into the given Android ViewGroup.

Link copied to clipboard
fun ComponentActivity.setUiContent(debug: Boolean = false, debugTag: String = "ViewCompose", dynamicColorPolicy: AndroidDynamicColorPolicy = AndroidDynamicColorPolicy.UseIfAvailable, themeRefreshController: AndroidThemeRefreshController? = null, overlayHostFactory: (ViewGroup) -> OverlayHost = { root -> OverlayHostDefaults.androidOrNoOp(root) }, onRenderStats: (RenderStats) -> Unit? = null, onRenderResult: (RenderTreeResult) -> Unit? = null, onRenderFailure: (RenderFailure) -> Unit? = null, content: UiTreeBuilder.(ViewGroup) -> Unit): ViewGroup

为 ComponentActivity 创建根容器、调用 setContentView,并启动 ViewCompose 渲染会话。 Creates the root container for ComponentActivity, calls setContentView, and starts a ViewCompose render session.

fun Fragment.setUiContent(debug: Boolean = false, debugTag: String = "ViewCompose", dynamicColorPolicy: AndroidDynamicColorPolicy = AndroidDynamicColorPolicy.UseIfAvailable, themeRefreshController: AndroidThemeRefreshController? = null, overlayHostFactory: (ViewGroup) -> OverlayHost = { root -> OverlayHostDefaults.androidOrNoOp(root) }, onRenderStats: (RenderStats) -> Unit? = null, onRenderResult: (RenderTreeResult) -> Unit? = null, onRenderFailure: (RenderFailure) -> Unit? = null, content: UiTreeBuilder.(ViewGroup) -> Unit): ViewGroup

创建并返回 Fragment 内容根节点,并将内部 RenderSession 绑定到 Fragment view lifecycle。 Creates and returns a Fragment content root and binds the internal RenderSession to the Fragment view lifecycle.

Link copied to clipboard

创建或返回绑定到 Android SavedStateRegistryOwner 的 ViewCompose saveable-state registry。 Creates or returns the ViewCompose saveable-state registry bound to an Android SavedStateRegistryOwner.