Stay organized with collections Save and categorize content based on your preferences.
public class MediaView extends FrameLayout

This class is deprecated.
Use MediaView.

View for displaying native app install ad media content. Add this view to the layout hierarchy, and register it using UnifiedNativeAdView.setMediaView(MediaView).

  1. If the returned ad contains a video element, the video will be automatically rendered on this MediaView. In the absence of MediaView, a fallback image will be returned in UnifiedNativeAd.getImages(). Therefore, to render a video, MediaView must be present in the layout hierarchy, and must be registered.
  2. If the returned ad does not contain a video element and contains images, MediaView will be used to automatically render the image.

Inherited Constant Summary

Inherited Field Summary

Public Constructor Summary

MediaView(Context context, AttributeSet attrs, int defStyleAttr)
MediaView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Method Summary

setImageScaleType(ImageView.ScaleType scaleType)
Sets the ImageView.ScaleType when image is rendered in MediaView.
setMediaContent(MediaContent mediaContent)
Sets the media content to be displayed in the media view.

Inherited Method Summary