Most visited

Recently visited

Added in API level 14

TextureView.SurfaceTextureListener

public static interface TextureView.SurfaceTextureListener

android.view.TextureView.SurfaceTextureListener


当与此纹理视图关联的表面纹理可用时,可以使用此侦听器进行通知。

Summary

Public methods

abstract void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height)

TextureView的SurfaceTexture准备好使用时调用。

abstract boolean onSurfaceTextureDestroyed(SurfaceTexture surface)

当指定的 SurfaceTexture即将销毁时调用。

abstract void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height)

SurfaceTexture的缓冲区大小发生变化时调用。

abstract void onSurfaceTextureUpdated(SurfaceTexture surface)

通过 updateTexImage()更新指定的 SurfaceTexture时调用。

Public methods

onSurfaceTextureAvailable

Added in API level 14
void onSurfaceTextureAvailable (SurfaceTexture surface, 
                int width, 
                int height)

TextureView的SurfaceTexture准备好使用时调用。

Parameters
surface SurfaceTexture: The surface returned by getSurfaceTexture()
width int: The width of the surface
height int: The height of the surface

onSurfaceTextureDestroyed

Added in API level 14
boolean onSurfaceTextureDestroyed (SurfaceTexture surface)

当指定的SurfaceTexture即将销毁时调用。 如果返回true,则在调用此方法后,表面纹理内不应发生渲染。 如果返回false,则客户端需要调用release() 大多数应用程序应返回true。

Parameters
surface SurfaceTexture: The surface about to be destroyed
Returns
boolean

onSurfaceTextureSizeChanged

Added in API level 14
void onSurfaceTextureSizeChanged (SurfaceTexture surface, 
                int width, 
                int height)

SurfaceTexture的缓冲区大小发生变化时调用。

Parameters
surface SurfaceTexture: The surface returned by getSurfaceTexture()
width int: The new width of the surface
height int: The new height of the surface

onSurfaceTextureUpdated

Added in API level 14
void onSurfaceTextureUpdated (SurfaceTexture surface)

通过 updateTexImage()更新指定的 SurfaceTexture时调用。

Parameters
surface SurfaceTexture: The surface just updated

Hooray!