---
title: "ImageProvider"
description: "Image resource from an Android Drawable resource."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun ImageProvider(@DrawableRes resId: Int): ImageProvider
```


Image resource from an Android Drawable resource.

#### Parameters

| | |
| --- | --- |
| resId | The resource ID of the Drawable resource to be used. |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
public fun ImageProvider(bitmap: Bitmap): ImageProvider
```


Image resource from a bitmap.

#### Parameters

| | |
| --- | --- |
| bitmap | The bitmap to be displayed. |




<div class='sourceset sourceset-android'>Android</div>


```kotlin
@RequiresApi(Build.VERSION_CODES.M)
public fun ImageProvider(icon: Icon): ImageProvider
```


Image resource from an icon.

#### Parameters

| | |
| --- | --- |
| icon | The icon to be displayed. |




