Google is committed to advancing racial equity for Black communities. See how.

Builder

class Builder : BaseBuilder<ImageViewStyle!, ImageViewStyle.Builder!>
androidx.autofill.inline.common.ImageViewStyle.Builder

Builder for the ImageViewStyle.

Summary

Public constructors

Public methods
ImageViewStyle

ImageViewStyle.Builder
setMaxHeight(maxHeight: Int)

Sets a maximum height for the image view.

ImageViewStyle.Builder
setMaxWidth(maxWidth: Int)

Sets a maximum width for the image view.

ImageViewStyle.Builder
setScaleType(@NonNull scaleType: ScaleType)

Sets the scale type of the image view.

ImageViewStyle.Builder
setTintList(@NonNull imageTintList: ColorStateList)

Sets a tint color to the image view.

Public constructors

<init>

Builder()

Public methods

build

@NonNull fun build(): ImageViewStyle

setMaxHeight

@NonNull fun setMaxHeight(maxHeight: Int): ImageViewStyle.Builder

Sets a maximum height for the image view.

Parameters
maxHeight Int: maximum height for this view

setMaxWidth

@NonNull fun setMaxWidth(maxWidth: Int): ImageViewStyle.Builder

Sets a maximum width for the image view.

Parameters
maxWidth Int: maximum width for this view

setScaleType

@NonNull fun setScaleType(@NonNull scaleType: ScaleType): ImageViewStyle.Builder

Sets the scale type of the image view.

Parameters
scaleType ScaleType: The desired scaling mode.

setTintList

@NonNull fun setTintList(@NonNull imageTintList: ColorStateList): ImageViewStyle.Builder

Sets a tint color to the image view.

Parameters
imageTintList ColorStateList: the tint color to apply to the image