CompanionAdSlotConfiguration

data class CompanionAdSlotConfiguration(val adView: ViewGroup, val width: Int = FLUID_COMPANION_AD_SIZE, val height: Int = FLUID_COMPANION_AD_SIZE)

Represents a single Companion Ad banner slot the application wants Google IMA Client Side Ad Insertion (CSAI) to render a companion ad creative into, alongside the primary linear ad view.

The application owns and supplies [adView]; it is responsible for adding it to its view hierarchy (and for showing/hiding it around ad breaks/content playback as desired) - IMA only renders the resolved companion ad creative into it, it does not manage its visibility.

Constructors

Link copied to clipboard
constructor(adView: ViewGroup, width: Int = FLUID_COMPANION_AD_SIZE, height: Int = FLUID_COMPANION_AD_SIZE)

Properties

Link copied to clipboard

The ViewGroup (typically a FrameLayout) supplied by the application for Google IMA to render the resolved companion ad creative into.

Link copied to clipboard
val height: Int

The height, in pixels, of the companion ad slot, or FLUID_COMPANION_AD_SIZE to let IMA size the creative fluidly based on adView's own layout.

Link copied to clipboard
val width: Int

The width, in pixels, of the companion ad slot, or FLUID_COMPANION_AD_SIZE to let IMA size the creative fluidly based on adView's own layout.