BaseDisplayContainer

public interface BaseDisplayContainer
Known Indirect Subclasses

A base class for more specialized container interfaces. The SDK-owned ad UI will be displayed within the container. Companion ads will be placed in the companion slots. Subclasses are responsible for displaying any additional media (linear ads, streams, etc.).

Public Method Summary

abstract void
destroy()
Releases resources attached to the container.
abstract ViewGroup
getAdContainer()
Returns the previously set container, or null if none has been set.
abstract Collection<CompanionAdSlot>
getCompanionSlots()
Gets the companion slots that have been set.
abstract void
registerVideoControlsOverlay(View videoControlsOverlay)
Registers video playback controls that will overlay this container.
abstract void
setAdContainer(ViewGroup container)
Sets the ViewGroup in which linear UI will be displayed.
abstract void
setCompanionSlots(Collection<CompanionAdSlot> companionSlots)
Sets slots for displaying companions.
abstract void
unregisterAllVideoControlsOverlays()
Unregisters all previously registered video controls overlays.

Public Methods

public abstract void destroy ()

Releases resources attached to the container. This will invalidate the container and remove all views attached to it. Should be called when the associated AdsLoader is no longer needed.

public abstract ViewGroup getAdContainer ()

Returns the previously set container, or null if none has been set.

public abstract Collection<CompanionAdSlot> getCompanionSlots ()

Gets the companion slots that have been set. Returns an empty list if none have been set.

public abstract void registerVideoControlsOverlay (View videoControlsOverlay)

Registers video playback controls that will overlay this container. WARNING: It is critical that video controls obscure as little ad space as possible so that viewabilty measurement isn't impacted.

Parameters
videoControlsOverlay Small or mostly transparent video controls overlay.

public abstract void setAdContainer (ViewGroup container)

Sets the ViewGroup in which linear UI will be displayed.

Parameters
container

public abstract void setCompanionSlots (Collection<CompanionAdSlot> companionSlots)

Sets slots for displaying companions.

Parameters
companionSlots

public abstract void unregisterAllVideoControlsOverlays ()

Unregisters all previously registered video controls overlays.

Send feedback about...

IMA DAI SDK for Android
Need help? Visit our support page.