Hi,

I need to display video (using the MediaPlayer API) on top of other
graphical content. I currently do this the following way:

* Create one subclass of SurfaceView, and render graphics to it using
Canvas.drawBitmap.
* Create another subclass of SurfaceView, and associate a MediaPlayer
with it using MediaPlayer.setDisplay(holder), where holder is the
SurfaceHolder of the SurfaceView.
* Add both SurfaceViews to my Activity using addContentView.

This basically works; the video is displayed on top of the graphical
content and plays ok. Some problems though:

1) According to Google, multiple SurfaceViews are not supposed to be
used in a window. The fact that it works for me seems to be by chance,
and behaviour could change in future versions of Android.

2) The video is placed in the upper left corner, and I haven't found a
way to position it differently.

Any suggestions on a different approach to implement this, that would
not make use of multiple surface views, and also allow me to position
the video, would be much appreciated.

Thanks,
Daniel

-- 
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