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