Class BannerAppearance.Builder
- java.lang.Object
-
- com.yandex.mobile.ads.nativeads.template.appearance.BannerAppearance.Builder
-
- Enclosing class:
- BannerAppearance
public static final class BannerAppearance.Builder extends java.lang.ObjectBuilds aBannerAppearance.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a newBannerAppearance.Builderfor constructing aBannerAppearance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BannerAppearancebuild()Constructs aBannerAppearancewith the specified appearance values.BannerAppearance.BuildersetBackgroundColor(int backgroundColor)Returns Banner appearance configured with background color.BannerAppearance.BuildersetBorderColor(int borderColor)Returns Banner appearance configured with border color.BannerAppearance.BuildersetBorderWidth(float borderWidth)Returns Banner appearance configured with banner border width.BannerAppearance.BuildersetContentPadding(HorizontalOffset contentPadding)Returns Banner appearance configured with horizontal space between banner edge and content.BannerAppearance.BuildersetImageMargins(HorizontalOffset imageMargins)Returns Banner appearance configured with horizontal image margins.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a newBannerAppearance.Builderfor constructing aBannerAppearance
-
-
Method Detail
-
build
@NonNull public BannerAppearance build()
Constructs aBannerAppearancewith the specified appearance values.- Returns:
BannerAppearance.
-
setBackgroundColor
@NonNull public BannerAppearance.Builder setBackgroundColor(int backgroundColor)
Returns Banner appearance configured with background color.- Parameters:
backgroundColor- Banner background color.- Returns:
- BannerAppearance.Builder with the specified background color.
-
setBorderColor
@NonNull public BannerAppearance.Builder setBorderColor(int borderColor)
Returns Banner appearance configured with border color.- Parameters:
borderColor- Banner border color.- Returns:
- BannerAppearance.Builder with the specified border color.
-
setBorderWidth
@NonNull public BannerAppearance.Builder setBorderWidth(float borderWidth)
Returns Banner appearance configured with banner border width.- Parameters:
borderWidth- Banner border width.- Returns:
- BannerAppearance.Builder with the specified banner border width.
-
setContentPadding
@NonNull public BannerAppearance.Builder setContentPadding(@NonNull HorizontalOffset contentPadding)
Returns Banner appearance configured with horizontal space between banner edge and content.- Parameters:
contentPadding- Horizontal space between banner edge and content.- Returns:
- BannerAppearance.Builder with the specified horizontal space between banner edge and content.
-
setImageMargins
@NonNull public BannerAppearance.Builder setImageMargins(@NonNull HorizontalOffset imageMargins)
Returns Banner appearance configured with horizontal image margins. Image margins are ignored for big images which are located below text block and stretched to match banner width.- Parameters:
imageMargins- Horizontal image margins: left margin determines image offset from left content padding, right margin determines offset between image and text block.- Returns:
- BannerAppearance.Builder with the specified horizontal image margins.
-
-