AdSizePolicy

sealed interface AdSizePolicy(source)

Defines the size of a banner ad. Choice depends on the desired ad format and container constraints.

Inheritors

Types

Link copied to clipboard
data class Fixed(val widthDp: Int, val heightDp: Int) : AdSizePolicy

Fixed-size banner with explicit width and height in dp.

Link copied to clipboard
data object Fluid : AdSizePolicy

Fluid banner that fills available width with no fixed height.

Link copied to clipboard
data class InlineAdaptive(val maxHeightDp: Int? = null) : AdSizePolicy

Inline adaptive banner with an optional maximum height.

Link copied to clipboard
data class LargeAnchoredAdaptive(val collapsible: CollapsiblePlacement? = null) : AdSizePolicy

Larger anchored adaptive banner (up to 120dp).

Functions

Link copied to clipboard
fun AdSizePolicy.toAndroidAdSize(activity: Activity, widthDp: Int): AdSize