CompanionAdSlot

interface CompanionAdSlot : AdSlot


A companion ad slot for the SDK to render ads.

Summary

Nested types

Listener interface for click events.

Constants

const Int

Fluid companion ads have no fixed size, but rather adapt to fit the creative content they display.

Public functions

Unit

Registers a listener for companion clicks.

Unit

Removes a listener for companion clicks.

Inherited functions

From com.google.ads.interactivemedia.v3.api.AdSlot
ViewGroup?

Returns the ad slot's ViewGroup instance where the SDK renders ads.

Int

Returns the height of the ad slot.

Int

Returns the width of the ad slot.

Boolean

Returns true if the ad slot is filled, false otherwise.

Unit
setContainer(container: ViewGroup!)

Sets the ad slot's ViewGroup instance for the SDK to render ads.

Unit
setSize(width: Int, height: Int)

Sets the size of the ad slot.

Constants

FLUID_SIZE

const val FLUID_SIZE = -2: Int

Fluid companion ads have no fixed size, but rather adapt to fit the creative content they display. Set width and height to fluid size to allow companion slot to be filled by fluid companion ad.

Public functions

addClickListener

fun addClickListener(clickListener: CompanionAdSlot.ClickListener!): Unit

Registers a listener for companion clicks.

removeClickListener

fun removeClickListener(clickListener: CompanionAdSlot.ClickListener!): Unit

Removes a listener for companion clicks.