public static interface NativeAdBase.NativeAdLoadConfigBuilder extends Ad.LoadConfigBuilder
Modifier and Type | Field and Description |
---|---|
static int |
UNKNOWN_IMAGE_SIZE
Constant for
withPreloadedIconView(int, int) that
means that preloaded bitmap will have default size. |
Modifier and Type | Method and Description |
---|---|
NativeAdBase.NativeLoadAdConfig |
build()
Builds a
NativeAdBase.NativeLoadAdConfig that can be used to load an ad. |
void |
loadAd()
Deprecated.
since 5.6, use
NativeAdBase.loadAd(NativeLoadAdConfig) |
NativeAdBase.NativeAdLoadConfigBuilder |
withAdListener(NativeAdListener adListener)
Sets an InterstitialAdListener to be notified on events in control lifecycle.
|
NativeAdBase.NativeAdLoadConfigBuilder |
withBid(java.lang.String bidPayload)
Allow to loads an ad from the payload supplied with a bid.
|
NativeAdBase.NativeAdLoadConfigBuilder |
withMediaCacheFlag(NativeAdBase.MediaCacheFlag mediaCacheFlag)
This method allows to disable pre-caching for the ads while it's enabled by default.
|
NativeAdBase.NativeAdLoadConfigBuilder |
withPreloadedIconView(int width,
int height)
Allow to pre-load an native ad icon image into memory that
allows instantly populate the image into
MediaView or
android.widget.ImageView during ad loading (if cache is enabled) or during
NativeAdBase.downloadMedia() call (if cache is disabled). |
static final int UNKNOWN_IMAGE_SIZE
withPreloadedIconView(int, int)
that
means that preloaded bitmap will have default size.
Note. For optimal performance you should avoid using this value and pass exact size of
MediaView
or android.widget.ImageView
.NativeAdBase.NativeAdLoadConfigBuilder withAdListener(NativeAdListener adListener)
adListener
- the listenerNativeAdBase.NativeAdLoadConfigBuilder withBid(java.lang.String bidPayload)
withBid
in interface Ad.LoadConfigBuilder
bidPayload
- The payload supplied with the bidNativeAdBase.NativeAdLoadConfigBuilder
NativeAdBase.NativeAdLoadConfigBuilder withMediaCacheFlag(NativeAdBase.MediaCacheFlag mediaCacheFlag)
mediaCacheFlag
- pre-cache option for ad assets.NativeAdBase.NativeAdLoadConfigBuilder
NativeAdBase.NativeAdLoadConfigBuilder withPreloadedIconView(int width, int height)
MediaView
or
android.widget.ImageView
during ad loading (if cache is enabled) or during
NativeAdBase.downloadMedia()
call (if cache is disabled).
width
- width of the icon
view or UNKNOWN_IMAGE_SIZE
height
- height of the icon
view or UNKNOWN_IMAGE_SIZE
NativeAdBase.NativeAdLoadConfigBuilder
NativeAdBase.loadAd(MediaCacheFlag)
,
NativeAdBase.downloadMedia()
@Deprecated void loadAd()
NativeAdBase.loadAd(NativeLoadAdConfig)
This method always returns immediately. The ad is loaded asynchronously. The control's ad listener will be called when loading finishes or fails.
NativeAdBase.NativeLoadAdConfig build()
NativeAdBase.NativeLoadAdConfig
that can be used to load an ad.build
in interface Ad.LoadConfigBuilder