# ImageViewStyle.Builder

Artifact: [androidx.autofill:autofill](https://developer.android.com/jetpack/androidx/releases/autofill) [View Source](https://cs.android.com/search?q=file:androidx/autofill/inline/common/ImageViewStyle.java+class:androidx.autofill.inline.common.ImageViewStyle.Builder) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

*** ** * ** ***


```
class ImageViewStyle.Builder
```

<br />

*** ** * ** ***

Builder for the `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder#Builder()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder#build()()` Returns a subclass of `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/BundledStyle` built by this builder. |
| `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder#setMaxHeight(int)(maxHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets a maximum height for the image view. |
| `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder#setMaxWidth(int)(maxWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets a maximum width for the image view. |
| `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder#setScaleType(android.widget.ImageView.ScaleType)(scaleType: https://developer.android.com/reference/android/widget/ImageView.ScaleType.html)` Sets the scale type of the image view. |
| `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder` | `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/ImageViewStyle.Builder#setTintList(android.content.res.ColorStateList)(imageTintList: https://developer.android.com/reference/android/content/res/ColorStateList.html)` Sets a tint color to the image view. |

## Public constructors

### Builder

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
Builder()
```

## Public functions

### build

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
fun build(): ImageViewStyle
```

Returns a subclass of `https://developer.android.com/reference/kotlin/androidx/autofill/inline/common/BundledStyle` built by this builder.

### setMaxHeight

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
fun setMaxHeight(maxHeight: Int): ImageViewStyle.Builder
```

Sets a maximum height for the image view.

| Parameters |
|---|---|
| `maxHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | maximum height for this view |

| See also |
|---|---|
| `https://developer.android.com/reference/android/widget/ImageView.html#setMaxHeight(int)` |   |

### setMaxWidth

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
fun setMaxWidth(maxWidth: Int): ImageViewStyle.Builder
```

Sets a maximum width for the image view.

| Parameters |
|---|---|
| `maxWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | maximum width for this view |

| See also |
|---|---|
| `https://developer.android.com/reference/android/widget/ImageView.html#setMaxWidth(int)` |   |

### setScaleType

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
fun setScaleType(scaleType: ImageView.ScaleType): ImageViewStyle.Builder
```

Sets the scale type of the image view.

| Parameters |
|---|---|
| `scaleType: https://developer.android.com/reference/android/widget/ImageView.ScaleType.html` | The desired scaling mode. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/widget/ImageView.html#setScaleType(android.widget.ImageView.ScaleType)` |   |

### setTintList

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/autofill#1.1.0)

```
fun setTintList(imageTintList: ColorStateList): ImageViewStyle.Builder
```

Sets a tint color to the image view.

| Parameters |
|---|---|
| `imageTintList: https://developer.android.com/reference/android/content/res/ColorStateList.html` | the tint color to apply to the image |

| See also |
|---|---|
| `https://developer.android.com/reference/android/widget/ImageView.html#setImageTintList(android.content.res.ColorStateList)` |   |