目录

CLASS info
public class NativeView extends PPSNativeView implements INativeView
Native ad view.

Public Constructor Summary

Constructor name
NativeView(Context context)
Native ad view constructor.
NativeView(Context context, AttributeSet attrs)
Native ad view constructor.
NativeView(Context context, AttributeSet attrs, int defStyleAttr)
Native ad view constructor.
NativeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Native ad view constructor.

Public Method Summary

ReturnMethod
voiddestroy()
Destroys NativeView. After this method is called, no other method can be called.
ViewgetAdSourceView()
Obtains an ad source view.
ViewgetDescriptionView()
Obtains an ad description view.
ViewgetCallToActionView()
Obtains a button view.
ViewgetTitleView()
Obtains a title view.
MediaViewgetMediaView()
Obtains a multimedia content view.
ViewgetIconView()
Obtains a view containing small icons.
ViewgetImageView()
Obtains an ad image view.
voidsetAdSourceView(View adSourceView)
Sets an ad source view.
voidsetDescriptionView(View descriptionView)
Sets an ad description view.
voidsetCallToActionView(View view)
Sets a button view.
voidsetTitleView(View view)
Sets a title view.
voidsetMediaView(MediaView view)
Sets a multimedia content view.
voidsetNativeAd(NativeAd nativeAd)
Sets a native ad.
voidsetIconView(View view)
Sets a view containing small icons.
voidsetImageView(View view)
Sets an ad image view.
voidgotoWhyThisAdPage()
Goes to the page explaining why an ad is displayed.

Public Constructors

constructor
public NativeView(Context context)
Native ad view constructor.

Parameters

Parameter nameParameter desc
contextContext.
constructor
public NativeView(Context context, AttributeSet attrs)
Native ad view constructor.

Parameters

Parameter nameParameter desc
contextContext.
attrsAttributes in an XML element of an extended view.
constructor
public NativeView(Context context, AttributeSet attrs, int defStyleAttr)
Native ad view constructor.

Parameters

Parameter nameParameter desc
contextContext.
attrsAttributes in an XML element of an extended view.
defStyleAttrDefault style.
constructor
public NativeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Native ad view constructor.

Parameters

Parameter nameParameter desc
contextContext.
attrsAttributes in an XML element of an extended view.
defStyleAttrDefault style.
defStyleResResource ID.

Public Methods

Method
public void destroy()
Destroys NativeView. After this method is called, no other method can be called.
Method
public View getAdSourceView()
Obtains an ad source view.

Return

typedesc
ViewAd source view.
Method
public View getDescriptionView()
Obtains an ad description view.

Return

typedesc
ViewAd description view.
Method
public View getCallToActionView()
Obtains a button view.

Return

typedesc
ViewButton view.
Method
public View getTitleView()
Obtains a title view.

Return

typedesc
ViewView associated with title materials.
Method
public MediaView getMediaView()
Obtains a multimedia content view.

Return

typedesc
MediaViewMultimedia content view.
Method
public View getIconView()
Obtains a view containing small icons.

Return

typedesc
ViewView containing small icons.
Method
public View getImageView()
Obtains an ad image view.

Return

typedesc
ViewAd image view.
Method
public void setAdSourceView(View adSourceView)
Sets an ad source view.

Parameters

Parameter nameParameter desc
adSourceViewAd source view.
Method
public void setDescriptionView(View descriptionView)
Sets an ad description view.

Parameters

Parameter nameParameter desc
descriptionViewAd description view.
Method
public void setCallToActionView(View view)
Sets a button view.

Parameters

Parameter nameParameter desc
viewButton view.
Method
public void setTitleView(View view)
Sets a title view.

Parameters

Parameter nameParameter desc
viewTitle view.
Method
public void setMediaView(MediaView view)
Sets a multimedia content view.

Parameters

Parameter nameParameter desc
viewMultimedia content view.
Method
public void setNativeAd(NativeAd nativeAd)
Sets a native ad.

Parameters

Parameter nameParameter desc
nativeAdNative ad object that has been gotten.
Method
public void setIconView(View view)
Sets a view containing small icons.

Parameters

Parameter nameParameter desc
viewView containing small icons.
Method
public void setImageView(View view)
Sets an ad image view.

Parameters

Parameter nameParameter desc
viewAd image view.
Method
public void gotoWhyThisAdPage()
Goes to the page explaining why an ad is displayed.