public static interface NativeAdBase.NativeAdLoadConfigBuilder
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 |
---|---|
void |
loadAd()
Loads an ad.
|
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 withBid(java.lang.String bidPayload)
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()
void loadAd()
This method always returns immediately. The ad is loaded asynchronously. The control's ad listener will be called when loading finishes or fails.