# IconKt

Added in 1.1.0

*** ** * ** ***


```
public final class IconKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/graphics/drawable/IconKt#(android.graphics.Bitmap).toAdaptiveIcon()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Bitmap.html receiver)` Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this adaptive `https://developer.android.com/reference/android/graphics/Bitmap.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/graphics/drawable/IconKt#(android.graphics.Bitmap).toIcon()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/Bitmap.html receiver)` Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this `https://developer.android.com/reference/android/graphics/Bitmap.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/graphics/drawable/IconKt#(kotlin.ByteArray).toIcon()(@https://developer.android.com/reference/androidx/annotation/NonNull byte[] receiver)` Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/drawable/Icon.html` | `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 26) https://developer.android.com/reference/androidx/core/graphics/drawable/IconKt#(android.net.Uri).toIcon()(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html receiver)` Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this `https://developer.android.com/reference/android/net/Uri.html`. |

## Public methods

### toAdaptiveIcon

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/drawable/Icon.kt+function:toAdaptiveIcon) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Icon toAdaptiveIcon(@NonNull Bitmap receiver)
```

Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this adaptive `https://developer.android.com/reference/android/graphics/Bitmap.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap)` |   |

### toIcon

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/drawable/Icon.kt+function:toIcon) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Icon toIcon(@NonNull Bitmap receiver)
```

Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this `https://developer.android.com/reference/android/graphics/Bitmap.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithBitmap(android.graphics.Bitmap)` |   |

### toIcon

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/drawable/Icon.kt+function:toIcon) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Icon toIcon(@NonNull byte[] receiver)
```

Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithData(byte[], int, int)` |   |

### toIcon

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/drawable/Icon.kt+function:toIcon) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
@RequiresApi(value = 26)
public static final @NonNull Icon toIcon(@NonNull Uri receiver)
```

Create an `https://developer.android.com/reference/android/graphics/drawable/Icon.html` from this `https://developer.android.com/reference/android/net/Uri.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithContentUri(android.net.Uri)` |   |