# Script.FieldBase

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)

# FieldBase

*** ** * ** ***

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

```
open class FieldBase
```

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

*** ** * ** ***

| **This class was deprecated in API level 31.**
|
| Deprecated in Java.

Only intended for use by generated reflected code.

## Summary

|                                                   Protected constructors                                                    ||
|--------------------------------------------------------------------------------------------------------------------------|---|
| [FieldBase](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#FieldBase())`()` <br /> |

|                                                                                                              Public methods                                                                                                               ||
|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| open[Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)! | [getAllocation](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#getAllocation())`()` <br />       |
| open[Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)!       | [getElement](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#getElement())`()` <br />             |
| open[Type](https://developer.android.com/reference/kotlin/android/renderscript/Type)!             | [getType](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#getType())`()` <br />                   |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)                  | [updateAllocation](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#updateAllocation())`()` <br /> |

|                                                                                                                                                                                                                                                                  Protected methods                                                                                                                                                                                                                                                                   ||
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [init](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#init(android.renderscript.RenderScript,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `dimx:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br />                                                                                                       |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [init](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#init(android.renderscript.RenderScript,%20kotlin.Int,%20kotlin.Int))`(`rs:` `[RenderScript](https://developer.android.com/reference/kotlin/android/renderscript/RenderScript)!`, `dimx:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `usages:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> |

|                                                                                                                      Properties                                                                                                                       ||
|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Allocation](https://developer.android.com/reference/kotlin/android/renderscript/Allocation)! | [mAllocation](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#mAllocation:android.renderscript.Allocation) <br /> |
| [Element](https://developer.android.com/reference/kotlin/android/renderscript/Element)!       | [mElement](https://developer.android.com/reference/kotlin/android/renderscript/Script.FieldBase#mElement:android.renderscript.Element) <br />          |

## Protected constructors

### FieldBase

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

```
protected FieldBase()
```

## Public methods

### getAllocation

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

```
open fun getAllocation(): Allocation!
```

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

### getElement

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

```
open fun getElement(): Element!
```

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

### getType

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

```
open fun getType(): Type!
```

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

### updateAllocation

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

```
open fun updateAllocation(): Unit
```

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

## Protected methods

### init

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

```
protected open fun init(
    rs: RenderScript!, 
    dimx: Int
): Unit
```

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

### init

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

```
protected open fun init(
    rs: RenderScript!, 
    dimx: Int, 
    usages: Int
): Unit
```

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

## Properties

### mAllocation

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

```
protected var mAllocation: Allocation!
```

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

### mElement

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

```
protected var mElement: Element!
```

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