Class NativeTemplateAppearance.Builder
- java.lang.Object
-
- com.yandex.mobile.ads.nativeads.template.appearance.NativeTemplateAppearance.Builder
-
- Enclosing class:
- NativeTemplateAppearance
public static final class NativeTemplateAppearance.Builder extends java.lang.Object
Builds aNativeTemplateAppearance
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a newNativeTemplateAppearance.Builder
for constructing aNativeTemplateAppearance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NativeTemplateAppearance
build()
Constructs aNativeTemplateAppearance
with the specified appearance values.NativeTemplateAppearance.Builder
withAgeAppearance(TextAppearance ageAppearance)
Returns NativeTemplateAppearance configured with age appearance.NativeTemplateAppearance.Builder
withBannerAppearance(BannerAppearance bannerAppearance)
Returns NativeTemplateAppearance configured with banner appearance.NativeTemplateAppearance.Builder
withBodyAppearance(TextAppearance bodyAppearance)
Returns NativeTemplateAppearance configured with body appearance.NativeTemplateAppearance.Builder
withCallToActionAppearance(ButtonAppearance appearance)
Returns NativeTemplateAppearance configured with callToAction appearance.NativeTemplateAppearance.Builder
withDomainAppearance(TextAppearance domainAppearance)
Returns NativeTemplateAppearance configured with domain appearance.NativeTemplateAppearance.Builder
withFaviconAppearance(ImageAppearance faviconAppearance)
Returns NativeTemplateAppearance configured with favicon appearance.NativeTemplateAppearance.Builder
withImageAppearance(ImageAppearance imageAppearance)
Returns NativeTemplateAppearance configured with image appearance.NativeTemplateAppearance.Builder
withRatingAppearance(RatingAppearance ratingAppearance)
Returns NativeTemplateAppearance configured with rating appearance.NativeTemplateAppearance.Builder
withReviewCountAppearance(TextAppearance reviewCountAppearance)
Returns NativeTemplateAppearance configured with review count appearance.NativeTemplateAppearance.Builder
withSponsoredAppearance(TextAppearance sponsoredAppearance)
Returns NativeTemplateAppearance configured with sponsored appearance.NativeTemplateAppearance.Builder
withTitleAppearance(TextAppearance titleAppearance)
Returns NativeTemplateAppearance configured with title appearance.NativeTemplateAppearance.Builder
withWarningAppearance(TextAppearance warningAppearance)
Returns NativeTemplateAppearance configured with warning appearance.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a newNativeTemplateAppearance.Builder
for constructing aNativeTemplateAppearance
-
-
Method Detail
-
build
@NonNull public NativeTemplateAppearance build()
Constructs aNativeTemplateAppearance
with the specified appearance values.- Returns:
NativeTemplateAppearance
.
-
withAgeAppearance
@NonNull public NativeTemplateAppearance.Builder withAgeAppearance(@NonNull TextAppearance ageAppearance)
Returns NativeTemplateAppearance configured with age appearance.- Parameters:
ageAppearance
- Appearance for customization of the age asset.- Returns:
- NativeTemplateAppearance.Builder with the specified age appearance.
-
withBannerAppearance
@NonNull public NativeTemplateAppearance.Builder withBannerAppearance(@NonNull BannerAppearance bannerAppearance)
Returns NativeTemplateAppearance configured with banner appearance.- Parameters:
bannerAppearance
- Appearance for customization of the Banner.- Returns:
- NativeTemplateAppearance.Builder with the specified banner appearance.
-
withBodyAppearance
@NonNull public NativeTemplateAppearance.Builder withBodyAppearance(@NonNull TextAppearance bodyAppearance)
Returns NativeTemplateAppearance configured with body appearance.- Parameters:
bodyAppearance
- Appearance for customization of the body asset.- Returns:
- NativeTemplateAppearance.Builder with the specified body appearance.
-
withCallToActionAppearance
@NonNull public NativeTemplateAppearance.Builder withCallToActionAppearance(@NonNull ButtonAppearance appearance)
Returns NativeTemplateAppearance configured with callToAction appearance.- Parameters:
appearance
- Appearance for customization of the callToAction asset.- Returns:
- NativeTemplateAppearance.Builder with the specified callToAction appearance.
-
withDomainAppearance
@NonNull public NativeTemplateAppearance.Builder withDomainAppearance(@NonNull TextAppearance domainAppearance)
Returns NativeTemplateAppearance configured with domain appearance.- Parameters:
domainAppearance
- Appearance for customization of the domain asset.- Returns:
- NativeTemplateAppearance.Builder with the specified domain appearance.
-
withFaviconAppearance
public NativeTemplateAppearance.Builder withFaviconAppearance(@NonNull ImageAppearance faviconAppearance)
Returns NativeTemplateAppearance configured with favicon appearance.- Parameters:
faviconAppearance
- Appearance for customization of the favicon asset.- Returns:
- NativeTemplateAppearance.Builder with the specified favicon appearance.
-
withImageAppearance
@NonNull public NativeTemplateAppearance.Builder withImageAppearance(@NonNull ImageAppearance imageAppearance)
Returns NativeTemplateAppearance configured with image appearance. Image appearance is ignored for big images which are located below text block and stretched to match banner width.- Parameters:
imageAppearance
- Appearance for customization of the image asset.- Returns:
- NativeTemplateAppearance.Builder with the specified image appearance.
-
withRatingAppearance
@NonNull public NativeTemplateAppearance.Builder withRatingAppearance(@NonNull RatingAppearance ratingAppearance)
Returns NativeTemplateAppearance configured with rating appearance.- Parameters:
ratingAppearance
- Appearance for customization of the rating asset.- Returns:
- NativeTemplateAppearance.Builder with the specified rating appearance.
-
withReviewCountAppearance
@NonNull public NativeTemplateAppearance.Builder withReviewCountAppearance(@NonNull TextAppearance reviewCountAppearance)
Returns NativeTemplateAppearance configured with review count appearance.- Parameters:
reviewCountAppearance
- Appearance for customization of the review count asset.- Returns:
- NativeTemplateAppearance.Builder with the specified review count appearance.
-
withSponsoredAppearance
@NonNull public NativeTemplateAppearance.Builder withSponsoredAppearance(@NonNull TextAppearance sponsoredAppearance)
Returns NativeTemplateAppearance configured with sponsored appearance.- Parameters:
sponsoredAppearance
- Appearance for customization of the sponsored asset.- Returns:
- NativeTemplateAppearance.Builder with the specified sponsored appearance.
-
withTitleAppearance
@NonNull public NativeTemplateAppearance.Builder withTitleAppearance(@NonNull TextAppearance titleAppearance)
Returns NativeTemplateAppearance configured with title appearance.- Parameters:
titleAppearance
- Appearance for customization of the title asset.- Returns:
- NativeTemplateAppearance.Builder with the specified title appearance.
-
withWarningAppearance
@NonNull public NativeTemplateAppearance.Builder withWarningAppearance(@NonNull TextAppearance warningAppearance)
Returns NativeTemplateAppearance configured with warning appearance.- Parameters:
warningAppearance
- Appearance for customization of the warning asset.- Returns:
- NativeTemplateAppearance.Builder with the specified warning appearance.
-
-