# SmallImage.Builder

# SmallImage.Builder

Artifact:[androidx.wear.watchface:watchface-complications-data](https://developer.android.com/jetpack/androidx/releases/wear-watchface)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/data/Image.kt+class:androidx.wear.watchface.complications.data.SmallImage.Builder)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/watchface/complications/data/SmallImage.Builder "View this page in Java")

<br />

```
class SmallImage.Builder
```

<br />

*** ** * ** ***

Builder for[SmallImage](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage).

## Summary

|                                                                                                                                                                                                                    ### Public constructors                                                                                                                                                                                                                    |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage.Builder#Builder(android.graphics.drawable.Icon,androidx.wear.watchface.complications.data.SmallImageType))`(image: `[Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)`, type: `[SmallImageType](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImageType)`)` |

|                                                        ### Public functions                                                        |
|------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [SmallImage](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage)                 | [build](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage.Builder#build())`()` Builds a[SmallImage](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage).                                                                                                                         |
| [SmallImage.Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage.Builder) | [setAmbientImage](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage.Builder#setAmbientImage(android.graphics.drawable.Icon))`(ambientImage: `[Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)`?)` Sets a different image for when the device is ambient mode to save power and prevent burn in. |

## Public constructors

### Builder

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)  

```
Builder(image: Icon, type: SmallImageType)
```  

|                                                             Parameters                                                             |
|------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| `image: `[Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)                                       | The[Icon](https://developer.android.com/reference/android/graphics/drawable/Icon.html)representing the image |
| `type: `[SmallImageType](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImageType) | The style of the image provided, to guide how it should be displayed                                         |

## Public functions

### build

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)  

```
fun build(): SmallImage
```

Builds a[SmallImage](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/SmallImage).  

### setAmbientImage

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)  

```
fun setAmbientImage(ambientImage: Icon?): SmallImage.Builder
```

Sets a different image for when the device is ambient mode to save power and prevent burn in. If no ambient variant is provided, the watch face may not show anything while in ambient mode.