TextureView.SurfaceTextureListener
public
static
interface
TextureView.SurfaceTextureListener
android.view.TextureView.SurfaceTextureListener |
This listener can be used to be notified when the surface texture associated with this texture view is available.
Summary
Public methods | |
---|---|
abstract
void
|
onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height)
Invoked when a |
abstract
boolean
|
onSurfaceTextureDestroyed(SurfaceTexture surface)
Invoked when the specified |
abstract
void
|
onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height)
Invoked when the |
abstract
void
|
onSurfaceTextureUpdated(SurfaceTexture surface)
Invoked when the specified |
Public methods
onSurfaceTextureAvailable
public abstract void onSurfaceTextureAvailable (SurfaceTexture surface, int width, int height)
Invoked when a TextureView
's SurfaceTexture is ready for use.
Parameters | |
---|---|
surface |
SurfaceTexture : The surface returned by
TextureView.getSurfaceTexture()
This value cannot be null . |
width |
int : The width of the surface |
height |
int : The height of the surface |
onSurfaceTextureDestroyed
public abstract boolean onSurfaceTextureDestroyed (SurfaceTexture surface)
Invoked when the specified SurfaceTexture
is about to be destroyed.
If returns true, no rendering should happen inside the surface texture after this method
is invoked. If returns false, the client needs to call SurfaceTexture#release()
.
Most applications should return true.
Parameters | |
---|---|
surface |
SurfaceTexture : The surface about to be destroyed
This value cannot be null . |
Returns | |
---|---|
boolean |
onSurfaceTextureSizeChanged
public abstract void onSurfaceTextureSizeChanged (SurfaceTexture surface, int width, int height)
Invoked when the SurfaceTexture
's buffers size changed.
Parameters | |
---|---|
surface |
SurfaceTexture : The surface returned by
TextureView.getSurfaceTexture()
This value cannot be null . |
width |
int : The new width of the surface |
height |
int : The new height of the surface |
onSurfaceTextureUpdated
public abstract void onSurfaceTextureUpdated (SurfaceTexture surface)
Invoked when the specified SurfaceTexture
is updated through
SurfaceTexture#updateTexImage()
.
Parameters | |
---|---|
surface |
SurfaceTexture : The surface just updated
This value cannot be null . |