ImageViewStyle.Builder


class ImageViewStyle.Builder


Builder for the ImageViewStyle.

Summary

Public constructors

Public functions

ImageViewStyle

Returns a subclass of BundledStyle built by this builder.

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

Sets the scale type of the image view.

ImageViewStyle.Builder
setTintList(imageTintList: ColorStateList)

Sets a tint color to the image view.

Public constructors

Builder

Added in 1.1.0
Builder()

Public functions

build

Added in 1.1.0
fun build(): ImageViewStyle

Returns a subclass of BundledStyle built by this builder.

setMaxHeight

Added in 1.1.0
fun setMaxHeight(maxHeight: Int): ImageViewStyle.Builder

Sets a maximum height for the image view.

Parameters
maxHeight: Int

maximum height for this view

See also
setMaxHeight

setMaxWidth

Added in 1.1.0
fun setMaxWidth(maxWidth: Int): ImageViewStyle.Builder

Sets a maximum width for the image view.

Parameters
maxWidth: Int

maximum width for this view

See also
setMaxWidth

setScaleType

Added in 1.1.0
fun setScaleType(scaleType: ImageView.ScaleType): ImageViewStyle.Builder

Sets the scale type of the image view.

Parameters
scaleType: ImageView.ScaleType

The desired scaling mode.

See also
setScaleType

setTintList

Added in 1.1.0
fun setTintList(imageTintList: ColorStateList): ImageViewStyle.Builder

Sets a tint color to the image view.

Parameters
imageTintList: ColorStateList

the tint color to apply to the image

See also
setImageTintList