BannerStyle.Builder


@RequiresCarApi(value = 9)
@ExperimentalCarApi
public final class BannerStyle.Builder


A builder for BannerStyle.

Summary

Public constructors

Public methods

@NonNull BannerStyle

Constructs a BannerStyle from the current state of this builder.

@NonNull BannerStyle.Builder

Sets the Background for the container.

@NonNull BannerStyle.Builder

Sets the Shape for the container.

Public constructors

Builder

Added in 1.9.0-alpha02
public Builder()

Public methods

build

Added in 1.9.0-alpha02
public @NonNull BannerStyle build()

Constructs a BannerStyle from the current state of this builder.

Throws
java.lang.IllegalStateException

if both shape and background are null

setBackground

Added in 1.9.0-alpha02
public @NonNull BannerStyle.Builder setBackground(@NonNull Background background)

Sets the Background for the container.

background must conform to COLOR_ONLY.

Throws
java.lang.NullPointerException

if background is null

java.lang.IllegalArgumentException

if background contains unsupported type

setShape

Added in 1.9.0-alpha02
public @NonNull BannerStyle.Builder setShape(@NonNull Shape shape)

Sets the Shape for the container.

Throws
java.lang.NullPointerException

if shape is null