Android SDK Version
  • java.lang.Object
    • com.facebook.ads.NativeBannerAdView

public class NativeBannerAdView
extends java.lang.Object
NativeBannerAdView provides a templated View for a NativeBannerAd with flexible width and height determined by NativeBannerAdView.Type.
Since:
4.99
Nested Class Summary
Modifier and TypeClass and Description
static class NativeBannerAdView.Type 
Constructor Summary
Constructor and Description
NativeBannerAdView() 
Method Summary
Modifier and TypeMethod and Description
static Viewrender(Context context, NativeBannerAd nativeBannerAd, NativeBannerAdView.Type type)
Allows to create View for specified NativeBannerAdView.Type.
static Viewrender(Context context, NativeBannerAd nativeBannerAd, NativeBannerAdView.Type type, NativeAdViewAttributes attributes)
Allows to create View for specified NativeAdView.Type and NativeAdViewAttributes.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

NativeBannerAdView

public NativeBannerAdView()
Method Detail

render

public static View render(Context context,
                          NativeBannerAd nativeBannerAd,
                          NativeBannerAdView.Type type)
Allows to create View for specified NativeBannerAdView.Type.
Parameters:
context - Android Context object.
nativeBannerAd - NativeBannerAd for which we create the template View.
type - NativeAdView.Type that specifies a template.
Returns:
A templated View.
Throws:
java.lang.IllegalStateException - If any of arguments is null.
Since:
4.99

render

public static View render(Context context,
                          NativeBannerAd nativeBannerAd,
                          NativeBannerAdView.Type type,
                          NativeAdViewAttributes attributes)
Allows to create View for specified NativeAdView.Type and NativeAdViewAttributes.
Parameters:
context - Android Context object.
nativeBannerAd - NativeBannerAd for which we create the template View.
type - NativeBannerAdView.Type that specifies a template.
attributes - optional NativeAdViewAttributes specification.
Returns:
A templated View.
Throws:
java.lang.IllegalStateException - If any of mandatory arguments is null.
Since:
4.99