Class NativeTemplateAppearance.Builder

com.yandex.mobile.ads.nativeads.template.appearance

public class NativeTemplateAppearance.Builder

A class for changing the settings for the standard layout of a native ad template.

Methods

Builder()

Creates an object of the NativeTemplateAppearance.Builder class.

NativeTemplateAppearance build()

Creates an object of the NativeTemplateAppearance class with the specified values.

NativeTemplateAppearance.Builder withAgeAppearance(final TextAppearance ageAppearance)

Sets parameters of the layout of a text with age restrictions.

NativeTemplateAppearance.Builder withBannerAppearance(final BannerAppearance bannerAppearance)

Sets general parameters for native advertising design.

NativeTemplateAppearance.Builder withBodyAppearance(final TextAppearance bodyAppearance)

Sets parameters for the main ad text layout.

NativeTemplateAppearance.Builder withCallToActionAppearance(final ButtonAppearance appearance)

Sets parameters for the design of a call-to-action button.

NativeTemplateAppearance.Builder withDomainAppearance(final TextAppearance domainAppearance)

Sets parameters that define the layout of a text with domain data.

NativeTemplateAppearance.Builder withFaviconAppearance(final ImageAppearance faviconAppearance)

Sets parameters for the favicon design.

NativeTemplateAppearance.Builder withImageAppearance(final ImageAppearance imageAppearance)

Sets parameters for the image design.

NativeTemplateAppearance.Builder withRatingAppearance(final RatingAppearance ratingAppearance)

Sets parameters for the rating design.

NativeTemplateAppearance.Builder withReviewCountAppearance(final TextAppearance reviewCountAppearance)

Sets parameters for the layout of a text with the number of app reviews.

NativeTemplateAppearance.Builder withSponsoredAppearance(final TextAppearance sponsoredAppearance)

Sets parameters for the layout of a text with the ad network name.

NativeTemplateAppearance.Builder withTitleAppearance(final TextAppearance titleAppearance)

Sets parameters for the ad title design.

NativeTemplateAppearance.Builder withWarningAppearance(final TextAppearance warningAppearance)

Sets parameters that define the layout of a warning text.

Method Detail

Builder

public Builder ()

Creates an object of the NativeTemplateAppearance.Builder class.

build

public NativeTemplateAppearance build ()

Creates an object of the NativeTemplateAppearance class with the specified values.

Returns:

An object of the NativeTemplateAppearance class with the specified values.

withAgeAppearance

public NativeTemplateAppearance.Builder withAgeAppearance (final TextAppearance ageAppearance)

Sets parameters of the layout of a text with age restrictions.

Parameters:
ageAppearance

Layout parameters for a text with age restrictions (TextAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified layout parameters for the age restriction text.

withBannerAppearance

public NativeTemplateAppearance.Builder withBannerAppearance (final BannerAppearance bannerAppearance)

Sets general parameters for native advertising design.

Parameters:
bannerAppearance

General parameters for native advertising design (BannerAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified general design parameters.

withBodyAppearance

public NativeTemplateAppearance.Builder withBodyAppearance (final TextAppearance bodyAppearance)

Sets parameters for the main ad text layout.

Parameters:
bodyAppearance

Layout parameters of the main ad text (TextAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified parameters for the main ad text layout.

withCallToActionAppearance

public NativeTemplateAppearance.Builder withCallToActionAppearance (final ButtonAppearance appearance)

Sets parameters for the design of a call-to-action button.

Parameters:
appearance

Parameters for the design of a call-to-action button (ButtonAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified button design parameters.

withDomainAppearance

public NativeTemplateAppearance.Builder withDomainAppearance (final TextAppearance domainAppearance)

Sets parameters that define the layout of a text with domain data.

Parameters:
domainAppearance

Layout parameters for a text with domain data (TextAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified text layout parameters.

withFaviconAppearance

public NativeTemplateAppearance.Builder withFaviconAppearance (final ImageAppearance faviconAppearance)

Sets parameters for the favicon design.

Parameters:
faviconAppearance

Favicon design parameters (ImageAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified favicon design parameters.

withImageAppearance

public NativeTemplateAppearance.Builder withImageAppearance (final ImageAppearance imageAppearance)

Sets parameters for the image design.

Note.

Doesn't apply to large images that are placed under the main ad text and cover the entire width of the ad.

Parameters:
imageAppearance

Image design parameters (ImageAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified image design parameters.

withRatingAppearance

public NativeTemplateAppearance.Builder withRatingAppearance (final RatingAppearance ratingAppearance)

Sets parameters for the rating design.

Parameters:
ratingAppearance

Rating design parameters (RatingAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified rating design parameters.

withReviewCountAppearance

public NativeTemplateAppearance.Builder withReviewCountAppearance (final TextAppearance reviewCountAppearance)

Sets parameters for the layout of a text with the number of app reviews.

Parameters:
reviewCountAppearance

Parameters for the layout of a text with the number of app reviews (TextAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified layout parameters of a text with the number of app reviews.

withSponsoredAppearance

public NativeTemplateAppearance.Builder withSponsoredAppearance (final TextAppearance sponsoredAppearance)

Sets parameters for the layout of a text with the ad network name.

Parameters:
sponsoredAppearance

Parameters for the layout of a text with the ad network name (TextAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified layout parameters of a text with the ad network name.

withTitleAppearance

public NativeTemplateAppearance.Builder withTitleAppearance (final TextAppearance titleAppearance)

Sets parameters for the ad title design.

Parameters:
titleAppearance

Ad title design parameters.

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified ad title design parameters.

withWarningAppearance

public NativeTemplateAppearance.Builder withWarningAppearance (final TextAppearance warningAppearance)

Sets parameters that define the layout of a warning text.

Parameters:
warningAppearance

Warning text layout parameters (TextAppearance).

Returns:

An object of the NativeTemplateAppearance.Builder class with the specified warning text layout parameters.