Mediaview displays native ad media content.
MediaView can be declared and added to view:
MediaView mediaView = new MediaView(context); addView(adView); mediaView.setNativeAd(nativeAd);
Extends: | RelativeLayout |
Package: | ads |
MediaView(Context, AttributeSet)
public MediaView(Context context, AttributeSet attributeSet)
Parameter | Description |
---|---|
context | |
attributeSet |
MediaView(Context)
public MediaView(Context context)
Parameter | Description |
---|---|
context |
setNativeAd(NativeAd)
public void setNativeAd(NativeAd nativeAd)
Parameter | Description |
---|---|
nativeAd |
isAutoplay()
public boolean isAutoplay()
setAutoplayOnMobile(boolean)
Set the mobile autoplay setting for video ads
public void setAutoplayOnMobile(boolean autoplay)
Parameter | Description |
---|---|
autoplay | Whether autoplay will only be enabled on Wifi or not |
setAutoplay(boolean)
Set the autoplay setting for video ads
public void setAutoplay(boolean autoplay)
Parameter | Description |
---|---|
autoplay | Whether autoplay is enabled or not |