Android SDK Version
  • java.lang.Object
    • LinearLayout
      • com.facebook.ads.NativeAdScrollView

public class NativeAdScrollView
extends LinearLayout
NativeAdScrollView provides a horizontal scrolling experience hosting either NativeAdViews or custom views. It must be constructed with a loaded NativeAdsManager
NativeAdScrollView can be declared using a template view as follows:
 int templateHeightDp = 400; NativeAdScrollView scrollView = new NativeAdScrollView(context, adsManager, templateHeightDp); addView(scrollView); 
Since:
4.6
Nested Class Summary
Modifier and TypeClass and Description
static interface NativeAdScrollView.AdViewProvider 
Field Summary
Modifier and TypeField and Description
static intDEFAULT_INSET 
static intDEFAULT_MAX_ADS 
Constructor Summary
Constructor and Description
NativeAdScrollView(Context context, NativeAdsManager manager, int nativeAdViewHeightDp) 
NativeAdScrollView(Context context, NativeAdsManager manager, int nativeAdViewHeightDp, NativeAdViewAttributes attributes) 
NativeAdScrollView(Context context, NativeAdsManager manager, int nativeAdViewHeightDp, NativeAdViewAttributes attributes, int maxAds) 
NativeAdScrollView(Context context, NativeAdsManager manager, NativeAdScrollView.AdViewProvider viewProvider) 
NativeAdScrollView(Context context, NativeAdsManager manager, NativeAdScrollView.AdViewProvider viewProvider, int maxAds) 
NativeAdScrollView(Context context, NativeAdsManager manager, NativeAdView.Type type)
Deprecated. 
NativeAdScrollView(Context context, NativeAdsManager manager, NativeAdView.Type type, NativeAdViewAttributes attributes)
Deprecated. 
NativeAdScrollView(Context context, NativeAdsManager manager, NativeAdView.Type type, NativeAdViewAttributes attributes, int maxAds)
Deprecated. 
Method Summary
Modifier and TypeMethod and Description
voidsetInset(int inset) 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail

DEFAULT_MAX_ADS

public static final int DEFAULT_MAX_ADS

DEFAULT_INSET

public static final int DEFAULT_INSET
Constructor Detail

NativeAdScrollView

public NativeAdScrollView(Context context,
                          NativeAdsManager manager,
                          NativeAdScrollView.AdViewProvider viewProvider)
Parameters:
context -
manager -
viewProvider -
Since:
4.6

NativeAdScrollView

public NativeAdScrollView(Context context,
                          NativeAdsManager manager,
                          NativeAdScrollView.AdViewProvider viewProvider,
                          int maxAds)
Parameters:
context -
manager -
viewProvider -
maxAds -
Since:
4.6

NativeAdScrollView

public NativeAdScrollView(Context context,
                          NativeAdsManager manager,
                          int nativeAdViewHeightDp)
Parameters:
context -
manager -
nativeAdViewHeightDp -
Since:
4.6

NativeAdScrollView

public NativeAdScrollView(Context context,
                          NativeAdsManager manager,
                          int nativeAdViewHeightDp,
                          NativeAdViewAttributes attributes)
Parameters:
context -
manager -
nativeAdViewHeightDp -
attributes -
Since:
4.6

NativeAdScrollView

public NativeAdScrollView(Context context,
                          NativeAdsManager manager,
                          int nativeAdViewHeightDp,
                          NativeAdViewAttributes attributes,
                          int maxAds)
Parameters:
context -
manager -
nativeAdViewHeightDp -
attributes -
maxAds -
Since:
4.6

NativeAdScrollView

@Deprecated
public NativeAdScrollView(Context context,
                                      NativeAdsManager manager,
                                      NativeAdView.Type type)
Deprecated. 

NativeAdScrollView

@Deprecated
public NativeAdScrollView(Context context,
                                      NativeAdsManager manager,
                                      NativeAdView.Type type,
                                      NativeAdViewAttributes attributes)
Deprecated. 

NativeAdScrollView

@Deprecated
public NativeAdScrollView(Context context,
                                      NativeAdsManager manager,
                                      NativeAdView.Type type,
                                      NativeAdViewAttributes attributes,
                                      int maxAds)
Deprecated. 
Method Detail

setInset

public void setInset(int inset)