Package-level declarations
Types
Link copied to clipboard
Resolves the application theme for a static preview variant.
Link copied to clipboard
One application-owned theme resolution shared by the preview root, native Views, and DSL tree.
Link copied to clipboard
data class ViewComposePreviewOptions(val theme: PreviewTheme = PreviewTheme.Light, val debug: Boolean = false, val debugTag: String = "ViewComposePreview")
配置单个 ViewCompose Preview 的宿主行为。 Configures host behavior for one ViewCompose Preview.
Functions
Link copied to clipboard
fun ViewComposePreview(modifier: Modifier = Modifier, options: ViewComposePreviewOptions = ViewComposePreviewOptions(), content: UiTreeBuilder.() -> Unit)
在 Compose Preview 中渲染一段不依赖 Android root 的 ViewCompose DSL 内容。 Renders ViewCompose DSL content that does not need the Android root inside Compose Preview.
Link copied to clipboard
fun ViewComposePreviewWithRoot(modifier: Modifier = Modifier, options: ViewComposePreviewOptions = ViewComposePreviewOptions(), content: UiTreeBuilder.(ViewGroup) -> Unit)
在 Compose Preview 中渲染一段需要访问 Android root ViewGroup 的 ViewCompose DSL 内容。 Renders ViewCompose DSL content that needs access to the Android root ViewGroup in Compose Preview.