public class MediaView
extends com.facebook.ads.internal.api.AdNativeComponentView
MediaView mediaView = new MediaView(context);
addView(adView);
mediaView.setNativeAd(nativeAd);
Constructor and Description |
---|
MediaView(Context context) |
MediaView(Context context,
AttributeSet attrs) |
MediaView(Context context,
AttributeSet attrs,
int defStyleAttr) |
MediaView(Context context,
AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
Modifier and Type | Method and Description |
---|---|
void |
addView(View child) |
void |
addView(View child,
int index) |
void |
addView(View child,
int width,
int height) |
void |
addView(View child,
int index,
ViewGroup.LayoutParams params) |
void |
addView(View child,
ViewGroup.LayoutParams params) |
void |
bringChildToFront(View child) |
void |
destroy() |
View |
getAdContentsView()
Used by other SDK classes and subject to change.
|
int |
getMediaHeight() |
com.facebook.ads.internal.api.MediaViewApi |
getMediaViewApi()
Used by other SDK classes and subject to change.
|
int |
getMediaWidth() |
void |
setListener(MediaViewListener listener) |
void |
setVideoRenderer(MediaViewVideoRenderer newVideoRenderer)
After creating the MediaView you can change the video renderer implementation to a custom
extension of MediaViewVideoRenderer.
|
public MediaView(Context context)
public MediaView(Context context, AttributeSet attrs)
public MediaView(Context context, AttributeSet attrs, int defStyleAttr)
public MediaView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
public com.facebook.ads.internal.api.MediaViewApi getMediaViewApi()
public void setVideoRenderer(MediaViewVideoRenderer newVideoRenderer)
newVideoRenderer
- new implementation of MediaViewVideoRendererpublic int getMediaWidth()
public int getMediaHeight()
public View getAdContentsView()
com.facebook.ads.internal.api.AdNativeComponentView
getAdContentsView
in class com.facebook.ads.internal.api.AdNativeComponentView
public void setListener(MediaViewListener listener)
public void destroy()
public void addView(View child)
public void addView(View child, int index)
public void addView(View child, ViewGroup.LayoutParams params)
public void addView(View child, int width, int height)
public void addView(View child, int index, ViewGroup.LayoutParams params)
public void bringChildToFront(View child)