NativeActivity.SurfaceChanged(ISurfaceHolder, Format, Int32, Int32) Method

Definition

This is called immediately after any structural changes (format or size) have been made to the surface.

[Android.Runtime.Register("surfaceChanged", "(Landroid/view/SurfaceHolder;III)V", "GetSurfaceChanged_Landroid_view_SurfaceHolder_IIIHandler")]
public virtual void SurfaceChanged(Android.Views.ISurfaceHolder? holder, Android.Graphics.Format format, int width, int height);
[<Android.Runtime.Register("surfaceChanged", "(Landroid/view/SurfaceHolder;III)V", "GetSurfaceChanged_Landroid_view_SurfaceHolder_IIIHandler")>]
abstract member SurfaceChanged : Android.Views.ISurfaceHolder * Android.Graphics.Format * int * int -> unit
override this.SurfaceChanged : Android.Views.ISurfaceHolder * Android.Graphics.Format * int * int -> unit

Parameters

holder
ISurfaceHolder

SurfaceHolder: The SurfaceHolder whose surface has changed. This value cannot be null.

format
Format

int: The new PixelFormat of the surface. Value is one of the following: PixelFormat.RGBA_8888 PixelFormat.RGBX_8888 PixelFormat.RGBA_F16 PixelFormat.RGBA_1010102 PixelFormat.RGB_888 PixelFormat.RGB_565

width
Int32

int: The new width of the surface. Value is 0 or greater

height
Int32

int: The new height of the surface. Value is 0 or greater

Implements

Attributes

Remarks

This is called immediately after any structural changes (format or size) have been made to the surface. You should at this point update the imagery in the surface. This method is always called at least once, after surfaceCreated(SurfaceHolder).

Android reference for android.app.NativeActivity.surfaceChanged.

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