BannerAdView

actual fun BannerAdView(placement: AdPlacement, modifier: Modifier, widthDp: Int?, onEvent: (AdEvent) -> Unit)(source)

Composable that renders a banner ad for the given placement. Self-loads when the AdManager is AdManagerStatus.Ready (unless the placement uses BannerRefreshPolicy.Manual). Sizes adaptive banners to the measured container width.

Parameters

placement

The banner placement configuration.

modifier

Modifier for the banner container.

widthDp

Override the measured width for adaptive banner sizing. Uses the measured container width when null.

onEvent

Callback for banner ad lifecycle events.

expect fun BannerAdView(placement: AdPlacement, modifier: Modifier = Modifier, widthDp: Int? = null, onEvent: (AdEvent) -> Unit = {})(source)

Composable that renders a banner ad for the given placement. Self-loads when the AdManager is AdManagerStatus.Ready (unless the placement uses BannerRefreshPolicy.Manual). Sizes adaptive banners to the measured container width.

Parameters

placement

The banner placement configuration.

modifier

Modifier for the banner container.

widthDp

Override the measured width for adaptive banner sizing. Uses the measured container width when null.

onEvent

Callback for banner ad lifecycle events.

actual fun BannerAdView(placement: AdPlacement, modifier: Modifier, widthDp: Int?, onEvent: (AdEvent) -> Unit)(source)

Composable that renders a banner ad for the given placement. Self-loads when the AdManager is AdManagerStatus.Ready (unless the placement uses BannerRefreshPolicy.Manual). Sizes adaptive banners to the measured container width.

Parameters

placement

The banner placement configuration.

modifier

Modifier for the banner container.

widthDp

Override the measured width for adaptive banner sizing. Uses the measured container width when null.

onEvent

Callback for banner ad lifecycle events.