Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# DrawInstructions

*** ** * ** ***

```
class DrawInstructions
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.widget.RemoteViews.DrawInstructions](https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions#) |

A data parcel that carries the instructions to draw the RemoteViews, as an alternative to XML layout.

## Summary

| Nested classes ||
|---|---|
|   | `https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions.Builder` Builder class for `https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions#` objects. |

| Public methods ||
|---|---|
| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\<[ByteArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html)!\> | `https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions#getBytes()()` Returns the list of serialized draw instructions. |
| static [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html) | `https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions#getSupportedVersion()()` Version number of `https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions#` currently supported. |

## Public methods

### getBytes

Added in [API level 37.2](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
fun getBytes(): MutableList<ByteArray!>
```

Returns the list of serialized draw instructions.

Each element in the list is a standalone `byte[]` representing a separate serialized draw instruction payload.

Note: This method is used to retrieve the raw byte payloads of the draw instructions (e.g. for custom rendering by passing them to a RemoteCompose player) rather than using the high-level RemoteViews inflation mechanism.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html!>` | The list of serialized draw instructions, where each element is a standalone `byte[]` representing a separate serialized draw instruction. This value cannot be `null`. |

### getSupportedVersion

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
static fun getSupportedVersion(): Long
```

Version number of `https://developer.android.com/reference/kotlin/android/widget/RemoteViews.DrawInstructions#` currently supported.