CompanionAdSlot

public interface CompanionAdSlot extends AdSlot


A companion ad slot for the SDK to render ads.

Summary

Nested types

Listener interface for click events.

Constants

default static final int

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

Public methods

abstract void

Registers a listener for companion clicks.

abstract void

Removes a listener for companion clicks.

Inherited methods

From com.google.ads.interactivemedia.v3.api.AdSlot
abstract @Nullable ViewGroup

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

abstract int

Returns the height of the ad slot.

abstract int

Returns the width of the ad slot.

abstract boolean

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

abstract void

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

abstract void
setSize(int width, int height)

Sets the size of the ad slot.

Constants

FLUID_SIZE

default static final int FLUID_SIZE = -2

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 methods

addClickListener

abstract void addClickListener(CompanionAdSlot.ClickListener clickListener)

Registers a listener for companion clicks.

removeClickListener

abstract void removeClickListener(CompanionAdSlot.ClickListener clickListener)

Removes a listener for companion clicks.