Partager via


Allocation.Resize(Int32) Method

Definition

Caution

deprecated

Resize a 1D allocation.

[Android.Runtime.Register("resize", "(I)V", "GetResize_IHandler")]
[System.Obsolete("deprecated")]
public virtual void Resize (int dimX);
[<Android.Runtime.Register("resize", "(I)V", "GetResize_IHandler")>]
[<System.Obsolete("deprecated")>]
abstract member Resize : int -> unit
override this.Resize : int -> unit

Parameters

dimX
Int32

The new size of the allocation.

Attributes

Remarks

Resize a 1D allocation. The contents of the allocation are preserved. If new elements are allocated objects are created with null contents and the new region is otherwise undefined.

If the new region is smaller the references of any objects outside the new region will be released.

A new type will be created with the new dimension.

This member is deprecated. RenderScript objects should be immutable once created. The replacement is to create a new allocation and copy the contents. This function will throw an exception if API 21 or higher is used.

Java documentation for android.renderscript.Allocation.resize(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to