NativeAdView
Composable that renders a native ad from the pool for the given placement. Acquires a NativeAdToken from the pool and releases it on dispose automatically. Each itemKey gets its own distinct ad, enabling stable list reuse.
Each AdLayout construction computes validation and structural identity. Callers defining custom layouts in Compose should retain them across recomposition using remember { adLayout { ... } } (or remember(key) { adLayout { ... } } for keyed reconstruction of dynamic layout variants).
Parameters
The native ad placement configuration.
Stable key for list reuse — distinct ads per unique key.
The native ad layout (defaults to AdTemplates.mediaCard).
Modifier for the native ad container.
Callback for native ad lifecycle events.
Composable that renders a native ad from the pool for the given placement. Acquires a NativeAdToken from the pool and releases it on dispose automatically. Each itemKey gets its own distinct ad, enabling stable list reuse.
Each AdLayout construction computes validation and structural identity. Callers defining custom layouts in Compose should retain them across recomposition using remember { adLayout { ... } } (or remember(key) { adLayout { ... } } for keyed reconstruction of dynamic layout variants).
Parameters
The native ad placement configuration.
Stable key for list reuse — distinct ads per unique key.
The native ad layout (defaults to AdTemplates.mediaCard).
Modifier for the native ad container.
Callback for native ad lifecycle events.
Composable that renders a native ad from the pool for the given placement. Acquires a NativeAdToken from the pool and releases it on dispose automatically. Each itemKey gets its own distinct ad, enabling stable list reuse.
Each AdLayout construction computes validation and structural identity. Callers defining custom layouts in Compose should retain them across recomposition using remember { adLayout { ... } } (or remember(key) { adLayout { ... } } for keyed reconstruction of dynamic layout variants).
Parameters
The native ad placement configuration.
Stable key for list reuse — distinct ads per unique key.
The native ad layout (defaults to AdTemplates.mediaCard).
Modifier for the native ad container.
Callback for native ad lifecycle events.