Annotation used to associate a PreviewWrapperProvider with a Composable.

When a preview is rendered, Android Studio looks for this annotation to determine if the preview content should be wrapped in a custom container (e.g., for Remote Compose or custom theming).

Scope and Precedence

This annotation is not repeatable. Each preview rendered uses at most one wrapper. The wrapper is applied to all Previews associated with this function, including direct @Preview annotations and MultiPreview annotations.

Examples

1. Basic Usage

// Your component content here

2. Usage with MultiPreview

// Your component content here

3. Combining Multiple Wrappers

Since PreviewWrapper allows only a single wrapper, you can create a composite wrapper to apply multiple effects.

// Your component content here

Summary

Public constructors

Cmn

Public properties

KClass<PreviewWrapperProvider>

The KClass of the PreviewWrapperProvider implementation to use.

Cmn

Public constructors

PreviewWrapper

PreviewWrapper(wrapper: KClass<PreviewWrapperProvider>)
Parameters
wrapper: KClass<PreviewWrapperProvider>

The KClass of the PreviewWrapperProvider implementation to use. Must have a default zero-argument constructor.

Public properties

wrapper

val wrapperKClass<PreviewWrapperProvider>

The KClass of the PreviewWrapperProvider implementation to use. Must have a default zero-argument constructor.