public class

MediaView

extends FrameLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.google.android.gms.ads.formats.MediaView

Class Overview

View for displaying native app install ad media content. Add this view to the layout hierarchy, and register it using 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 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.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
MediaView(Context context)
MediaView(Context context, AttributeSet attrs)
MediaView(Context context, AttributeSet attrs, int defStyleAttr)
MediaView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public MediaView (Context context)

Parameters
context Context

public MediaView (Context context, AttributeSet attrs)

Parameters
context Context
attrs AttributeSet

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

Parameters
context Context
attrs AttributeSet
defStyleAttr int

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

Parameters
context Context
attrs AttributeSet
defStyleAttr int
defStyleRes int