目录

NativeAdMonitor

Class Info

public final class NativeAdMonitor extends Object implements NativeMonitorListener, View.OnAttachStateChangeListener

Native ad view container, where a native ad is associated with a common view.

Public Constructor Summary

Constructor Name

NativeAdMonitor(View containerView, Map Map<String, View> clickableChildViews, Map<String, View> nonClickableChildViews)

Constructs a native ad view container.

Public Method Summary

Qualifier and Type

Method Name and Description

void

setNativeAd(NativeAd nativeAd)

Sets the associated native ad instance.

void

unregister()

Unregisters a native ad instance.

Public Constructors

[h2]NativeAdMonitor

Constructor

public NativeAdMonitor(View containerView, Map<String, View> clickableChildViews, Map<String, View> nonClickableChildViews)

Constructs a native ad view container.

Parameters

Name

Description

containerView

Container view. Set this parameter to the root view of a native ad unit.

clickableChildViews

List of child views that are clickable.

nonClickableChildViews

List of child views that are not clickable.

Public Methods

[h2]setNativeAd

Method

public void setNativeAd(NativeAd nativeAd)

Sets the associated native ad instance.

Parameters

Name

Description

nativeAd

Native ad instance.

[h2]unregister

Method

public void unregister()

Unregisters a native ad instance.