MediaView

Mediaview displays native ad media content.

MediaView can be declared and added to view:

MediaView mediaView = new MediaView(context); addView(adView); mediaView.setNativeAd(nativeAd);

扩展:RelativeLayout
应用安装包:ads
构造函数
MediaView(Context, AttributeSet)
public MediaView(Context context, AttributeSet attributeSet)
参数描述
context
attributeSet
MediaView(Context)
public MediaView(Context context)
参数描述
context
实例方法
setNativeAd(NativeAd)
public void setNativeAd(NativeAd nativeAd)
参数描述
nativeAd
isAutoplay()
public boolean isAutoplay()
setAutoplayOnMobile(boolean)

Set the mobile autoplay setting for video ads

public void setAutoplayOnMobile(boolean autoplay)
参数描述
autoplayWhether autoplay will only be enabled on Wifi or not
setAutoplay(boolean)

Set the autoplay setting for video ads

public void setAutoplay(boolean autoplay)
参数描述
autoplayWhether autoplay is enabled or not