合作咨询
我们的专家服务团队将竭诚为您提供专业的合作咨询服务
Class Info |
|---|
public class NativeView extends PPSNativeView implements INativeView 原生广告视图。 |
Constructor Name |
|---|
NativeView(Context context) 原生广告视图构造函数。 |
NativeView(Context context, AttributeSet attrs) 原生广告视图构造函数。 |
NativeView(Context context, AttributeSet attrs, int defStyleAttr) 原生广告视图构造函数。 |
NativeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) 原生广告视图构造函数。 |
Qualifier and Type | Method Name and Description |
|---|---|
void | destroy() 销毁NativeView, 该方法被调用后,其他方法都不应该再被调用。 |
View | 获取广告来源视图。 |
View | 获取行为按钮视图。 |
View | 获取广告描述视图。 |
View | 获取小图标视图。 |
View | 获取广告图片视图。 |
| 获取多媒体内容视图。 | |
View | 获取标题视图。 |
void | 跳转到为何看到此广告的页面。 |
boolean | register(AppDownloadButton appDownloadButton) 将下载按钮控件注册到View中,实现下载安装功能。 |
void | setAdSourceView(View adSourceView) 设置广告来源视图。 |
void | setCallToActionView(View view) 设置行为按钮视图。 |
void | setDescriptionView(View descriptionView) 设置广告描述视图。 |
void | setIconView(View view) 设置小图标视图。 |
void | setImageView(View view) 设置广告图片视图。 |
void | setMediaView(MediaView view) 设置多媒体内容视图。 |
void | setNativeAd(NativeAd nativeAd) 设置原生广告。 |
void | setTitleView(View view) 设置标题视图。 |
void | unregister(AppDownloadButton appDownloadButton) 将下载按钮控件从View中注销。 |
void | showAdvertiserInfoDialog(View anchorView, boolean showWhyThisAd) 展示广告主信息弹框。 |
void | 隐藏广告主信息弹框。 |
void | setAdFeedbackListener(AdFeedbackListener listener) 设置负反馈监听。 |
void | setAdCloseBtnClickListener(AdCloseBtnClickListener listener) 设置关闭监听。 |
Constructor |
|---|
public NativeView(Context context) 原生广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
Method |
|---|
public NativeView(Context context, AttributeSet attrs) 原生广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
attrs | 扩展视图的XML标签的属性。 |
Method |
|---|
public NativeView(Context context, AttributeSet attrs, int defStyleAttr) 原生广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
attrs | 扩展视图的XML标签的属性。 |
defStyleAttr | 默认样式。 |
Method |
|---|
public NativeView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) 原生广告视图构造函数。 |
Parameters
Name | Description |
|---|---|
context | 上下文。 |
attrs | 扩展视图的XML标签的属性。 |
defStyleAttr | 默认样式。 |
defStyleRes | 资源标识符。 |
Method |
|---|
public void destroy() 销毁NativeView, 该方法被调用后,其他方法都不应该再被调用。 |
Method |
|---|
public View getAdSourceView() 获取广告来源视图。 |
Returns
Type | Description |
|---|---|
View | 广告来源视图。 |
Method |
|---|
public View getCallToActionView() 获取行为按钮视图。 |
Returns
Type | Description |
|---|---|
View | 行为按钮视图。 |
Method |
|---|
public View getDescriptionView() 获取广告描述视图。 |
Returns
Type | Description |
|---|---|
View | 广告描述视图。 |
Method |
|---|
public View getIconView() 获取小图标视图。 |
Returns
Type | Description |
|---|---|
View | 小图标视图。 |
Method |
|---|
public View getImageView() 获取广告图片视图。 |
Returns
Type | Description |
|---|---|
View | 广告图片视图。 |
Method |
|---|
public View getTitleView() 获取标题视图。 |
Returns
Type | Description |
|---|---|
View | 与标题素材关联的视图。 |
Method |
|---|
public void gotoWhyThisAdPage() 跳转到为何看到此广告的页面。 |
Method |
|---|
public boolean register(AppDownloadButton appDownloadButton) 将下载按钮控件注册到View中,实现下载安装功能。 |
Parameters
Name | Description |
|---|---|
appDownloadButton | 下载按钮控件。 |
Returns
Type | Description |
|---|---|
boolean | 注册结果:
|
Method |
|---|
public void setAdSourceView(View adSourceView) 设置广告来源视图。 |
Parameters
Name | Description |
|---|---|
adSourceView | 广告来源视图。 |
Method |
|---|
public void setCallToActionView(View view) 设置行为按钮视图。 |
Parameters
Name | Description |
|---|---|
view | 行为按钮视图。 |
Method |
|---|
public void setDescriptionView(View descriptionView) 设置广告描述视图。 |
Parameters
Name | Description |
|---|---|
descriptionView | 广告描述视图。 |
Method |
|---|
public void setIconView(View view) 设置小图标视图。 |
Parameters
Name | Description |
|---|---|
view | 小图标视图。 |
Method |
|---|
public void setImageView(View view) 设置广告图片视图。 |
Parameters
Name | Description |
|---|---|
view | 广告图片视图。 |
Method |
|---|
public void setMediaView(MediaView view) 设置多媒体内容视图。 |
Parameters
Name | Description |
|---|---|
view | 多媒体内容视图。 |
Method |
|---|
public void setNativeAd(NativeAd nativeAd) 设置原生广告。 |
Parameters
Name | Description |
|---|---|
nativeAd | 获取到的原生广告对象。 |
Method |
|---|
public void setTitleView(View view) 设置标题视图。 |
Parameters
Name | Description |
|---|---|
view | 标题视图。 |
Method |
|---|
public void unregister(AppDownloadButton appDownloadButton) 将下载按钮控件从View中注销。 |
Parameters
Name | Description |
|---|---|
appDownloadButton | 下载按钮控件。 |
Method |
|---|
public void showAdvertiserInfoDialog(View anchorView, boolean showWhyThisAd) 展示广告主信息弹框。 |
Parameters
Name | Description |
|---|---|
anchorView | 锚点视图,弹框会根据锚点视图位置展示。 |
showWhyThisAd | 广告主信息弹框上是否显示为什么看到此广告。 |
Method |
|---|
public void hideAdvertiserInfoDialog() 隐藏广告主信息弹框。 |
Method |
|---|
public void setAdFeedbackListener (AdFeedbackListener listener) 设置负反馈监听。 |
Parameters
Name | Description |
|---|---|
listener | 负反馈监听器。 |
Method |
|---|
public void setAdCloseBtnClickListener (AdCloseBtnClickListener listener) 设置关闭监听。 |
Parameters
Name | Description |
|---|---|
listener | 关闭监听器。 |