Class NativeAdLoaderConfiguration.Builder

com.yandex.mobile.ads.nativeads

public  class  NativeAdLoaderConfiguration.Builder 

A class with the configuration loader (NativeAdLoaderConfiguration) for native advertising.

Methods

Builder(final String blockId, final boolean shouldLoadImagesAutomatically)

Creates an object of the NativeAdLoaderConfiguration.Builder class.

NativeAdLoaderConfiguration build()

Creates an object of the NativeAdLoaderConfiguration class.

Builder setImageSizes(final String... imageSizes)

Specifies a set of image sizes for the configuration loader.

Method Detail

Builder

public Builder (final String blockId, final boolean shouldLoadImagesAutomatically)

Creates an object of the NativeAdLoaderConfiguration.Builder class.

Parameters:
blockId

Unique ID of the ad placement (you can find out the parameter value in the Partner interface).

shouldLoadImagesAutomatically
Flag for automatic image loading. Acceptable values:
  • true — Automatic image loading.

  • false — Manual image loading.

Note.

To load images manually, use the loadImages() method for the NativeGenericAd class.

build

public NativeAdLoaderConfiguration build ()

Creates an object of the NativeAdLoaderConfiguration class.

Returns:

An object of the NativeAdLoaderConfiguration class.

setImageSizes

public Builder setImageSizes (final String... imageSizes)

Specifies a set of image sizes for the configuration loader.

Parameters:
imageSizes

A set of image sizes.

Note.

Image sizes must be supported by the application.

Returns:

Returns the configuration loader with the set of image sizes.