> 1) draw graphics over a camera preview when it is the whole view for
> the activity?
>
> 2)do the same thing with a camera preview in a layout shared with
> other (small) views?

Step #1: Put the camera preview's SurfaceView in a RelativeLayout.

Step #2: Put the other widgets in the same RelativeLayout, after the
SurfaceView in the XML, such that those widgets will overlap the
SurfaceView.

Step #3: There is no step #3.

RelativeLayout and FrameLayout support overlapping widgets; RelativeLayout
is usually more useful when you have one thing that is the full screen and
stuff that overlaps portions of it.

You can see an example of this technique here, where I use SurfaceView for
playing back video and have pop-up panels activated by on-screen taps:

http://github.com/commonsguy/vidtry

It is conceivable that somehow the camera preview's SurfaceView will fail
at this where the MediaPlayer's SurfaceView succeeds, but that would
surprise me.

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