Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public static interface

TextureView.SurfaceTextureListener

android.view.TextureView.SurfaceTextureListener

Class Overview

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 TextureView 's SurfaceTexture is ready for use.
abstract boolean onSurfaceTextureDestroyed ( SurfaceTexture surface)
Invoked when the specified SurfaceTexture is about to be destroyed.
abstract void onSurfaceTextureSizeChanged ( SurfaceTexture surface, int width, int height)
Invoked when the SurfaceTexture 's buffers size changed.
abstract void onSurfaceTextureUpdated ( SurfaceTexture surface)
Invoked when the specified SurfaceTexture is updated through updateTexImage() .

Public Methods

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

Invoked when a TextureView 's SurfaceTexture is ready for use.

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

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 release() . Most applications should return true.

Parameters
surface The surface about to be destroyed

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

Invoked when the SurfaceTexture 's buffers size changed.

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

public abstract void onSurfaceTextureUpdated ( SurfaceTexture surface)

Invoked when the specified SurfaceTexture is updated through updateTexImage() .

Parameters
surface The surface just updated