# Byte2

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

# Byte2

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/renderscript/Byte2 "View this page in Java")  

```
open class Byte2
```

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

*** ** * ** ***

| **This class was deprecated in API level 31.**
|
| Renderscript has been deprecated in API level 31. Please refer to the[migration guide](https://developer.android.com/guide/topics/renderscript/migration-guide)for the proposed alternatives.

Class for exposing the native RenderScript byte2 type back to the Android system.

## Summary

|                                                                                                                                                Public constructors                                                                                                                                                 ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [Byte2](https://developer.android.com/reference/kotlin/android/renderscript/Byte2#Byte2())`()` <br />                                                                                                                                                                                                           |
| [Byte2](https://developer.android.com/reference/kotlin/android/renderscript/Byte2#Byte2(kotlin.Byte,%20kotlin.Byte))`(`initX:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`, `initY:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`)` <br /> |

|                                                                                    Properties                                                                                     ||
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
| [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html) | [x](https://developer.android.com/reference/kotlin/android/renderscript/Byte2#x:kotlin.Byte) <br /> |
| [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html) | [y](https://developer.android.com/reference/kotlin/android/renderscript/Byte2#y:kotlin.Byte) <br /> |

## Public constructors

### Byte2

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

```
Byte2()
```  

### Byte2

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

```
Byte2(
    initX: Byte, 
    initY: Byte)
```

## Properties

### x

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

```
var x: Byte
```

**Deprecated:** *Deprecated in Java.*  

### y

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

```
var y: Byte
```

**Deprecated:** *Deprecated in Java.*