The SurfaceTexture is created during the first layout pass. You need
to add the TextureView to the window first.

On Wed, Jan 11, 2012 at 4:09 PM, dcheng <[email protected]> wrote:
> When using the TextureView class, when is the SurfaceTexture created?
>
> I created a class that has a private member TextureView mTexture and
> implements TextureView.SurfaceTextureListener.
>
> In the constructor, I added these lines:
>
>        mTextureView = new TextureView(context);
>        mTextureView.setSurfaceTextureListener(this);
>
> Then I wait for the onSurfaceTextureAvailable(SurfaceTexture surface,
> int width, int height) callback for the SurfaceTexture but it never
> gets called.
>
> Is there something else required to trigger the
> onSurfaceTextureAvailable callback?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Romain Guy
Android framework engineer
[email protected]

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to