Sandy wrote:
> One of the things I'm trying to design is a Picture in Picture, or
> PiP, effect which displays one video playing on the "full screen"
> while another plays as an insert. This is the same type of effect you
> see when watching a news program on TV in which the commentator is
> shown sitting at a desk and recorded footage is shown in a "box" on
> the same screen. However, in my use-case, the full screen is a camera
> preview and the PIP window is the video playback. Apart from the PIP
> overlay I want to overlap some buttons like pause, resume to control
> the preview settings.
> 
> The camera preview uses a SurfaceView and Camera classes and video
> playback uses the VideoView as in the samples. But not sure how the
> overlapping windows can be achieved. I have looked through the
> reference docs and did not find any explanation on what is the best
> way is to achieve  overlays. Maybe multiple SurfaceViews is more
> suited for this, can someone please comment on the use-case that I
> have described above and suggest any ideas on how to achieve this.

I suspect CPU speed will be the Achilles heel of your project.

That being said, use RelativeLayout. Put the camera preview as the first
child of the RelativeLayout and the VideoView as the second child. The
VideoView will appear to be "on top of" the SurfaceView for the camera
preview.

BTW, VideoView really is a SurfaceView. Note that you may decide someday
to use a SurfaceView and MediaPlayer, rather than a VideoView, so you
can get more control on video playback.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

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