AdView

View for showing either an Ad or SlotAdFlight. To configure the view for display, Use configure for persistent ads or configure for slot ads.

When the view becomes visible, call didAppear. When it becomes hidden, call didDisappear. You must call dispose when the view will no longer be shown.

Constructors

Link copied to clipboard
constructor(context: Context)
constructor(context: Context, attrs: AttributeSet)
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int)

Types

Link copied to clipboard
interface Listener
Listener interface for ad loading events.

Functions

Link copied to clipboard
open fun configure(@NonNull ad: Ad, @Nullable listener: AdView.Listener)
open fun configure(@NonNull slotAdFlight: SlotAdFlight, @Nullable listener: AdView.Listener)
Configure and start loading the ad.
Link copied to clipboard
open fun didAppear()
Called when an ad becomes visible.
Link copied to clipboard
open fun didDisappear()
Called when an ad is dismissed (i.e.
Link copied to clipboard
open fun dispose()
Called when an ad view will no longer be used.
Link copied to clipboard
Link copied to clipboard
open fun setTouchInterceptionEnabled(touchInterceptionEnabled: Boolean)
Use this to enable touch interception in the ad view if zooming in image-based ads doesn't work.