Class NativeBannerView
-
- All Implemented Interfaces:
@MainThread() public final class NativeBannerView
NativeBannerView provides template for displaying native ads. Banner appearance such as asset offsets, fonts, colors, sizes, e.g. may be confugured with @p applyAppearance: method.
-
-
Constructor Summary
Constructors Constructor Description NativeBannerView(Context context)
Constructs a new NativeBannerView programmatically. NativeBannerView(Context context, AttributeSet attrs)
Constructs a new NativeBannerView from XML
layout file.NativeBannerView(Context context, AttributeSet attrs, Integer defStyleAttr)
Constructs a new NativeBannerView from XML
layout file.
-
Method Summary
Modifier and Type Method Description final Unit
applyAppearance(NativeTemplateAppearance templateAppearance)
Use this method to change default appearance. final Unit
setAd(NativeAd nativeAd)
Configures NativeBannerView with native ad's content.
-
-
-
Constructor Detail
-
NativeBannerView
NativeBannerView(Context context)
Constructs a new NativeBannerView programmatically.- Parameters:
context
- The Context the view is running in, through which it can access the current theme, resources, etc.
-
NativeBannerView
NativeBannerView(Context context, AttributeSet attrs)
Constructs a new NativeBannerView fromXML
layout file.- Parameters:
context
- The Context the view is running in, through which it can access the current theme, resources, etc.attrs
- The attributes of the XML tag that is inflating the view.
-
NativeBannerView
NativeBannerView(Context context, AttributeSet attrs, Integer defStyleAttr)
Constructs a new NativeBannerView fromXML
layout file.- Parameters:
context
- The Context the view is running in, through which it can access the current theme, resources, etc.attrs
- The attributes of the XML tag that is inflating the view.defStyleAttr
- An attribute in the current theme that contains a reference to a style resource that supplies default values for the view.
-
-
Method Detail
-
applyAppearance
final Unit applyAppearance(NativeTemplateAppearance templateAppearance)
Use this method to change default appearance.
- Parameters:
templateAppearance
- Custom banner appearance.
-
setAd
final Unit setAd(NativeAd nativeAd)
Configures NativeBannerView with native ad's content.
- Parameters:
nativeAd
- An NativeAd object.
-
-