View holder for Native Ads which is an alternative way to show Native Ads. Instead of
using NativeAdView
to show Native Ads, publisher can provide Views owned by the app itself.
|
NativeAdViewHolder(View
containerView, Map<String, View>
clickableAssetViews, Map<String, View>
nonclickableAssetViews)
Construct a
NativeAdViewHolder.
|
| void | |
| void | |
| void | |
| void |
unregisterNativeAd()
Dissociate this view holder from the
NativeAd
or UnifiedNativeAd
it's currently showing.
|
Construct a NativeAdViewHolder.
| containerView | A container View for the
ad. All views in clickableAssetViews and nonclickableAssetViews must be children of
this View. |
|---|---|
| clickableAssetViews | The Map of clickable
asset names to corresponding View. |
| nonclickableAssetViews | The Map of
non-clickable asset names to corresponding View. Pass
null if there are no non-clickable Views. |
Sets the UnifiedNativeAd
that this view holder will show. Reset to another UnifiedNativeAd
to show a different ad.
| ad | The UnifiedNativeAd
that will be shown in this view holder's views. |
|---|
Dissociate this view holder from the NativeAd
or UnifiedNativeAd
it's currently showing.