ImageViewStyle.Builder


public final class ImageViewStyle.Builder


Builder for the ImageViewStyle.

Summary

Public constructors

Public methods

@NonNull ImageViewStyle

Returns a subclass of BundledStyle built by this builder.

@NonNull ImageViewStyle.Builder
setMaxHeight(int maxHeight)

Sets a maximum height for the image view.

@NonNull ImageViewStyle.Builder
setMaxWidth(int maxWidth)

Sets a maximum width for the image view.

@NonNull ImageViewStyle.Builder

Sets the scale type of the image view.

@NonNull ImageViewStyle.Builder

Sets a tint color to the image view.

Public constructors

Builder

Added in 1.1.0
public Builder()

Public methods

build

Added in 1.1.0
public @NonNull ImageViewStyle build()

Returns a subclass of BundledStyle built by this builder.

setMaxHeight

Added in 1.1.0
public @NonNull ImageViewStyle.Builder setMaxHeight(int maxHeight)

Sets a maximum height for the image view.

Parameters
int maxHeight

maximum height for this view

See also
setMaxHeight

setMaxWidth

Added in 1.1.0
public @NonNull ImageViewStyle.Builder setMaxWidth(int maxWidth)

Sets a maximum width for the image view.

Parameters
int maxWidth

maximum width for this view

See also
setMaxWidth

setScaleType

Added in 1.1.0
public @NonNull ImageViewStyle.Builder setScaleType(@NonNull ImageView.ScaleType scaleType)

Sets the scale type of the image view.

Parameters
@NonNull ImageView.ScaleType scaleType

The desired scaling mode.

See also
setScaleType

setTintList

Added in 1.1.0
public @NonNull ImageViewStyle.Builder setTintList(@NonNull ColorStateList imageTintList)

Sets a tint color to the image view.

Parameters
@NonNull ColorStateList imageTintList

the tint color to apply to the image

See also
setImageTintList