Android SDK Version
  • java.lang.Object
    • FrameLayout

public class NativeAdLayout
NativeAdLayout is a wrapper for FrameLayout that is required to show the inline ad reporting menu for Native Ads. Inline ad reporting makes it easier for users to report bad ads so that the overall experience can be improved.
To create an Ad using this wrapper, create a NativeAdLayout and add your current ad layout as the root element. Since NativeAdLayout is simply a FrameLayout, you can add your current layout as is.
Then, when creating the AdOptionsView, make sure to pass the NativeAdLayout in the constructor.
When rendering the ad, you can check that everything is working properly by clicking on the Ad Choices button. If the NativeAdLayout was passed, we will render an overlay on top of the ad with the reporting options. Otherwise, or if the ad is too small, it will open a website.
Constructor Summary
Constructor and Description
NativeAdLayout(Context context) 
NativeAdLayout(Context context, AttributeSet attrs) 
NativeAdLayout(Context context, AttributeSet attrs, int defStyleAttr) 
NativeAdLayout(Context context, nativeAdLayoutApi)
Used by other SDK classes and subject to change.
Method Summary
Modifier and TypeMethod and Description
Used by other SDK classes and subject to change.
voidsetMaxWidth(int maxWidth) 
voidsetMinWidth(int minWidth) 
Methods inherited from class
attachAdComponentViewApi, onAttachedToWindow, onDetachedFromWindow, onMeasure, onVisibilityChanged, onWindowFocusChanged, setLayoutParams
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail


public NativeAdLayout(Context context)


public NativeAdLayout(Context context,
                      AttributeSet attrs)


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


public NativeAdLayout(Context context,
Used by other SDK classes and subject to change.
Method Detail


public getNativeAdLayoutApi()
Used by other SDK classes and subject to change.


public void setMinWidth(int minWidth)


public void setMaxWidth(int maxWidth)