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