public final class

NativeContentAdView

extends NativeAdView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.google.android.gms.ads.formats.NativeAdView
           ↳ com.google.android.gms.ads.formats.NativeContentAdView

Class Overview

Root view for all Google native content ads.

XML layout files for native content ads should use NativeContentAdView as the root element for their native assets, and dynamically created views that will contain native content ad assets should use an instance of this class as their root ViewGroup.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
NativeContentAdView(Context context)
NativeContentAdView(Context context, AttributeSet attrs)
NativeContentAdView(Context context, AttributeSet attrs, int defStyleAttr)
NativeContentAdView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
final View getAdvertiserView()
Returns the view associated with the advertiser asset.
final View getBodyView()
Returns the view associated with the body asset.
final View getCallToActionView()
Returns the view associated with the call to action asset.
final View getHeadlineView()
Returns the view associated with the headline asset.
final View getImageView()
Returns the view associated with the image asset.
final View getLogoView()
Returns the view associated with the logo asset.
final MediaView getMediaView()
Returns the view associated with the media content.
final void setAdvertiserView(View view)
Sets a view for the advertiser asset.
final void setBodyView(View view)
Sets a view for the body asset.
final void setCallToActionView(View view)
Sets a view for the call to action asset.
final void setHeadlineView(View view)
Sets a view for the headline asset.
final void setImageView(View view)
Sets a view for the image asset.
final void setLogoView(View view)
Sets a view for the logo asset.
final void setMediaView(MediaView view)
Sets a media view for media content.
[Expand]
Inherited Methods
From class com.google.android.gms.ads.formats.NativeAdView
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public NativeContentAdView (Context context)

Parameters
context Context

public NativeContentAdView (Context context, AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

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

Parameters
context Context
attrs AttributeSet
defStyleAttr int

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

Parameters
context Context
attrs AttributeSet
defStyleAttr int
defStyleRes int

Public Methods

public final View getAdvertiserView ()

Returns the view associated with the advertiser asset.

Returns
View

public final View getBodyView ()

Returns the view associated with the body asset.

Returns
View

public final View getCallToActionView ()

Returns the view associated with the call to action asset.

Returns
View

public final View getHeadlineView ()

Returns the view associated with the headline asset.

Returns
View

public final View getImageView ()

Returns the view associated with the image asset.

Returns
View

public final View getLogoView ()

Returns the view associated with the logo asset.

Returns
View

public final MediaView getMediaView ()

Returns the view associated with the media content.

Returns
MediaView

public final void setAdvertiserView (View view)

Sets a view for the advertiser asset.

Parameters
view View: The view to set

public final void setBodyView (View view)

Sets a view for the body asset.

Parameters
view View: The view to set

public final void setCallToActionView (View view)

Sets a view for the call to action asset.

Parameters
view View: The view to set

public final void setHeadlineView (View view)

Sets a view for the headline asset.

Parameters
view View: The view to set

public final void setImageView (View view)

Sets a view for the image asset.

Parameters
view View: The view to set

public final void setLogoView (View view)

Sets a view for the logo asset.

Parameters
view View: The view to set

public final void setMediaView (MediaView view)

Sets a media view for media content.

Parameters
view MediaView: The MediaView to set