public static interface TextureView.SurfaceTextureListener
| android.view.TextureView.SurfaceTextureListener |
当与此纹理视图关联的表面纹理可用时,可以使用此侦听器进行通知。
公共方法(Public methods) |
|
|---|---|
abstract void |
onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) 当 |
abstract boolean |
onSurfaceTextureDestroyed(SurfaceTexture surface) 当指定的 |
abstract void |
onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) 当 |
abstract void |
onSurfaceTextureUpdated(SurfaceTexture surface) 通过 |
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 |
boolean onSurfaceTextureDestroyed (SurfaceTexture surface)
当指定的SurfaceTexture即将销毁时调用。 如果返回true,则在调用此方法后,表面纹理内不应发生渲染。 如果返回false,则客户端需要调用release() 。 大多数应用程序应返回true。
| 参数(Parameters) | |
|---|---|
surface |
SurfaceTexture: The surface about to be destroyed |
| 返回(Returns) | |
|---|---|
boolean |
|
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 |
void onSurfaceTextureUpdated (SurfaceTexture surface)
通过 updateTexImage()更新指定的 SurfaceTexture时调用。
| 参数(Parameters) | |
|---|---|
surface |
SurfaceTexture: The surface just updated |