> My SurfaceView is present in my layout (with height, width...). And it
> loaded before to this piece of code.
> What do you means by "Is your SurfaceView prepared by the time"?

No. Register a SurfaceHolder.Callback with your SurfaceHolder. Then, do
not attempt to use the SurfaceView until the surfaceCreated() callback
occurs in the SurfaceHolder.Callback.

Now, in the vidtry sample I listed, I don't do that, because I don't
attempt to load an MP4 file automatically. By the time the user enters a
URL and clicks Go, the surface has been ready for quite a while.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

Reply via email to