CompanionAdSlot

public interface CompanionAdSlot

A companion ad slot for which the SDK should retrieve ads.

Nested Class Summary

interface CompanionAdSlot.ClickListener Listener interface for click events. 

Constant Summary

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

Public Method Summary

abstract void
addClickListener(CompanionAdSlot.ClickListener clickListener)
Registers a listener for companion clicks.
abstract ViewGroup
getContainer()
Returns the ViewGroup into which the companion will be rendered.
abstract int
getHeight()
Returns the height of the companion slot.
abstract int
getWidth()
Returns the width of the companion slot.
abstract boolean
isFilled()
Returns true if the companion slot is filled, false otherwise.
abstract void
removeClickListener(CompanionAdSlot.ClickListener clickListener)
Removes a listener for companion clicks.
abstract void
setContainer(ViewGroup container)
Sets the ViewGroup into which the companion will be rendered.
abstract void
setSize(int width, int height)
Sets the size of the slot.

Constants

public static final int FLUID_SIZE

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.

Constant Value: -2

Public Methods

public abstract void addClickListener (CompanionAdSlot.ClickListener clickListener)

Registers a listener for companion clicks.

Parameters
clickListener

public abstract ViewGroup getContainer ()

Returns the ViewGroup into which the companion will be rendered.

public abstract int getHeight ()

Returns the height of the companion slot.

public abstract int getWidth ()

Returns the width of the companion slot.

public abstract boolean isFilled ()

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

public abstract void removeClickListener (CompanionAdSlot.ClickListener clickListener)

Removes a listener for companion clicks.

Parameters
clickListener

public abstract void setContainer (ViewGroup container)

Sets the ViewGroup into which the companion will be rendered. Required.

Parameters
container

public abstract void setSize (int width, int height)

Sets the size of the slot. Only companions matching the slot size will be displayed in the slot.

Parameters
width
height