Class Info |
|---|
public class NativeView extends PPSNativeView implements INativeView Native ad view. |
Constructor Name |
|---|
NativeView(Context context) Constructs a NativeView object. |
NativeView(Context context, AttributeSet attrs) Constructs a NativeView object. |
NativeView(Context context, AttributeSet attrs, int defStyleAttr) Constructs a NativeView object. |
NativeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) Constructs a NativeView object. |
Qualifier and Type | Method Name and Description |
|---|---|
void | destroy() Destroys a NativeView object. After this method is called, no other methods can be called. |
View | Obtains an ad source view. |
View | Obtains a button view. |
View | Obtains an ad description view. |
View | Obtains a view containing small icons. |
View | Obtains an ad image view. |
| Obtains a multimedia content view. | |
View | Obtains a title view. |
void | Goes to the page explaining why an ad is displayed. |
boolean | register(AppDownloadButton appDownloadButton) Registers the app download button with NativeView to implement download and installation. |
void | setAdSourceView(View adSourceView) Sets an ad source view. |
void | setCallToActionView(View view) Sets a button view. |
void | setDescriptionView(View descriptionView) Sets an ad description view. |
void | setIconView(View view) Sets a view containing small icons. |
void | setImageView(View view) Sets an ad image view. |
void | setMediaView(MediaView view) Sets a multimedia content view. |
void | setNativeAd(NativeAd nativeAd) Sets a native ad. |
void | setTitleView(View view) Sets a title view. |
void | unregister(AppDownloadButton appDownloadButton) Unregisters the app download button from NativeView. |
void | showAdvertiserInfoDialog(View anchorView, boolean showWhyThisAd) Displays the advertiser information dialog box. |
void | Hides the advertiser information dialog box. |
void | setAdFeedbackListener(AdFeedbackListener listener) Sets a negative feedback listener. |
void | setAdCloseBtnClickListener(AdCloseBtnClickListener listener) Sets a listener for ad closing. |
Constructor |
|---|
public NativeView(Context context) Constructs a NativeView object. |
Parameters
Name | Description |
|---|---|
context | Context. |
Method |
|---|
public NativeView(Context context, AttributeSet attrs) Constructs a NativeView object. |
Parameters
Name | Description |
|---|---|
context | Context. |
attrs | Attributes in an XML tag of an extended view. |
Method |
|---|
public NativeView(Context context, AttributeSet attrs, int defStyleAttr) Constructs a NativeView object. |
Parameters
Name | Description |
|---|---|
context | Context. |
attrs | Attributes in an XML tag of an extended view. |
defStyleAttr | Default style. |
Method |
|---|
public NativeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) Constructs a NativeView object. |
Parameters
Name | Description |
|---|---|
context | Context. |
attrs | Attributes in an XML tag of an extended view. |
defStyleAttr | Default style. |
defStyleRes | Resource ID. |
Method |
|---|
public void destroy() Destroys a NativeView object. After this method is called, no other methods can be called. |
Method |
|---|
public View getAdSourceView() Obtains an ad source view. |
Returns
Type | Description |
|---|---|
View | Ad source view. |
Method |
|---|
public View getCallToActionView() Obtains a button view. |
Returns
Type | Description |
|---|---|
View | Button view. |
Method |
|---|
public View getDescriptionView() Obtains an ad description view. |
Returns
Type | Description |
|---|---|
View | Ad description view. |
Method |
|---|
public View getIconView() Obtains a view containing small icons. |
Returns
Type | Description |
|---|---|
View | View containing small icons. |
Method |
|---|
public View getImageView() Obtains an ad image view. |
Returns
Type | Description |
|---|---|
View | Ad image view. |
Method |
|---|
public MediaView getMediaView() Obtains a multimedia content view. |
Returns
Type | Description |
|---|---|
Multimedia content view. |
Method |
|---|
public View getTitleView() Obtains a title view. |
Returns
Type | Description |
|---|---|
View | Title view. |
Method |
|---|
public void gotoWhyThisAdPage() Goes to the page explaining why an ad is displayed. |
Method |
|---|
public boolean register(AppDownloadButton appDownloadButton) Registers the app download button with NativeView to implement download and installation. |
Parameters
Name | Description |
|---|---|
appDownloadButton | App download button. |
Returns
Type | Description |
|---|---|
boolean | Whether the registration is successful.
|
Method |
|---|
public void setAdSourceView(View adSourceView) Sets an ad source view. |
Parameters
Name | Description |
|---|---|
adSourceView | Ad source view. |
Method |
|---|
public void setCallToActionView(View view) Sets a button view. |
Parameters
Name | Description |
|---|---|
view | Button view. |
Method |
|---|
public void setDescriptionView(View descriptionView) Sets an ad description view. |
Parameters
Name | Description |
|---|---|
descriptionView | Ad description view. |
Method |
|---|
public void setIconView(View view) Sets a view containing small icons. |
Parameters
Name | Description |
|---|---|
view | View containing small icons. |
Method |
|---|
public void setImageView(View view) Sets an ad image view. |
Parameters
Name | Description |
|---|---|
view | Ad image view. |
Method |
|---|
public void setMediaView(MediaView view) Sets a multimedia content view. |
Parameters
Name | Description |
|---|---|
view | Multimedia content view. |
Method |
|---|
public void setNativeAd(NativeAd nativeAd) Sets a native ad. |
Parameters
Name | Description |
|---|---|
nativeAd | Native ad object that has been obtained. |
Method |
|---|
public void setTitleView(View view) Sets a title view. |
Parameters
Name | Description |
|---|---|
view | Title view. |
Method |
|---|
public void unregister(AppDownloadButton appDownloadButton) Unregisters the app download button from NativeView. |
Parameters
Name | Description |
|---|---|
appDownloadButton | App download button. |
Method |
|---|
public void showAdvertiserInfoDialog(View anchorView, boolean showWhyThisAd) Displays the advertiser information dialog box. |
Parameters
Name | Description |
|---|---|
anchorView | Anchor view. The dialog box is displayed based on the anchor view position. |
showWhyThisAd | Indicates whether the advertiser information dialog box displays the reason why the advertiser sees the ad. |
Method |
|---|
public void hideAdvertiserInfoDialog() Hides the advertiser information dialog box. |
Method |
|---|
public void setAdFeedbackListener (AdFeedbackListener listener) Sets a negative feedback listener. |
Parameters
Name | Description |
|---|---|
listener | Negative feedback listener. |
Method |
|---|
public void setAdCloseBtnClickListener (AdCloseBtnClickListener listener) Sets a listener for ad closing. |
Parameters
Name | Description |
|---|---|
listener | Listener for ad closing. |