Android SDK Version
- AbstractAdListener
- Ad
- AdChoicesView
- AdError
- AdIconView
- AdListener
- AdOptionsView
- AdOptionsView.Orientation
- AdSettings
- AdSettings.IntegrationErrorMode
- AdSettings.MultiprocessSupportMode
- AdSettings.TestAdType
- AdSize
- AdView
- AudienceNetworkActivity
- AudienceNetworkAds
- AudienceNetworkAds.AdFormat
- AudienceNetworkAds.InitListener
- AudienceNetworkAds.InitResult
- AudienceNetworkAds.InitSettingsBuilder
- BidderTokenProvider
- CacheFlag
- DefaultMediaViewVideoRenderer
- ExtraHints
- ExtraHints.Builder
- ExtraHints.HintType
- ExtraHints.Keyword
- InstreamVideoAdListener
- InstreamVideoAdView
- InterstitialAd
- InterstitialAdExtendedListener
- InterstitialAdListener
- MediaView
- MediaViewListener
- MediaViewVideoRenderer
- MediaViewVideoRendererWithBackgroundPlayback
- NativeAd
- NativeAd.AdCreativeType
- NativeAdBase
- NativeAdBase.Image
- NativeAdBase.MediaCacheFlag
- NativeAdBase.NativeComponentTag
- NativeAdBase.Rating
- NativeAdLayout
- NativeAdListener
- NativeAdScrollView
- NativeAdScrollView.AdViewProvider
- NativeAdsManager
- NativeAdsManager.Listener
- NativeAdView
- NativeAdView.Type
- NativeAdViewAttributes
- NativeBannerAd
- NativeBannerAdView
- NativeBannerAdView.Type
- RewardData
- RewardedVideoAd
- RewardedVideoAdExtendedListener
- RewardedVideoAdListener
- S2SRewardedVideoAdExtendedListener
- S2SRewardedVideoAdListener
- VideoAutoplayBehavior
- VideoStartReason
- java.lang.Object
- RelativeLayout
- com.facebook.ads.internal.api.AdNativeComponentView
- com.facebook.ads.MediaView
Direct Known Subclasses:
public class MediaView
extends com.facebook.ads.internal.api.AdNativeComponentView
MediaView displays native ad media content. MediaView can be declared and added to view:
MediaView mediaView = new MediaView(context); addView(adView); mediaView.setNativeAd(nativeAd);
Since:
4.6
Constructor Summary
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) |
Method Summary
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. |
Constructor Detail
MediaView
public MediaView(Context context)
Since:
4.6
MediaView
public MediaView(Context context, AttributeSet attrs)
Since:
4.6
MediaView
public MediaView(Context context, AttributeSet attrs, int defStyleAttr)
Since:
4.6
MediaView
public MediaView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Since:
4.6
Method Detail
getMediaViewApi
public com.facebook.ads.internal.api.MediaViewApi getMediaViewApi()
Used by other SDK classes and subject to change.
setVideoRenderer
public void setVideoRenderer(MediaViewVideoRenderer newVideoRenderer)
After creating the MediaView you can change the video renderer implementation to a custom extension of MediaViewVideoRenderer.
Parameters:
newVideoRenderer
- new implementation of MediaViewVideoRenderergetMediaWidth
public int getMediaWidth()
getMediaHeight
public int getMediaHeight()
getAdContentsView
public View getAdContentsView()
Description copied from class:
com.facebook.ads.internal.api.AdNativeComponentView
Used by other SDK classes and subject to change.
Specified by:
getAdContentsView
in class com.facebook.ads.internal.api.AdNativeComponentView
setListener
public void setListener(MediaViewListener listener)
destroy
public void destroy()
addView
public void addView(View child)
addView
public void addView(View child, int index)
addView
public void addView(View child, ViewGroup.LayoutParams params)
addView
public void addView(View child, int width, int height)
addView
public void addView(View child, int index, ViewGroup.LayoutParams params)
bringChildToFront
public void bringChildToFront(View child)