NativeAdView

public abstract class NativeAdView extends FrameLayout
Known Direct Subclasses

The root view for all Google native ads.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

NativeAdView(Context context)
Construct a NativeAdView from code.
NativeAdView(Context context, AttributeSet attrs)
Construct a NativeAdView from an XML layout.
NativeAdView(Context context, AttributeSet attrs, int defStyleAttr)
Construct a NativeAdView from an XML layout.
NativeAdView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Construct a NativeAdView from an XML layout.

Public Method Summary

void
destroy()
Destroy the native ad view.
AdChoicesView
getAdChoicesView()
Returns the view associated with AdChoices content.
void
setAdChoicesView(AdChoicesView adChoicesView)
Sets an AdChoicesView for displaying AdChoices content.
void
setNativeAd(NativeAd ad)
Sets the NativeAd that this view is currently displaying.

Inherited Method Summary

Public Constructors

public NativeAdView (Context context)

Construct a NativeAdView from code.

Parameters
context The Context in which the NativeAdView is running.

public NativeAdView (Context context, AttributeSet attrs)

Construct a NativeAdView from an XML layout.

public NativeAdView (Context context, AttributeSet attrs, int defStyleAttr)

Construct a NativeAdView from an XML layout.

public NativeAdView (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Construct a NativeAdView from an XML layout.

Public Methods

public void destroy ()

Destroy the native ad view. No other methods should be called on the ad view after destroy() is called.

public AdChoicesView getAdChoicesView ()

Returns the view associated with AdChoices content.

public void setAdChoicesView (AdChoicesView adChoicesView)

Sets an AdChoicesView for displaying AdChoices content.

Parameters
adChoicesView The AdChoicesView to set

public void setNativeAd (NativeAd ad)

Sets the NativeAd that this view is currently displaying.

Parameters
ad the native ad that the view is currently displaying