2

I'm trying to display an image on top of a surface where a camera preview is running. So far I have the camera running using a SurfaceHolder. I thought maybe I could use a FrameLayout to stack an image on top of the camera preview, but I don't know how to go about it. How can I do this, or is there any other way to do it?

I prefer to code programatically, but any help is appreciated!

Thank You

Shubham
  • 949
  • 6
  • 21
  • 29

1 Answers1

6

Instead of using a FrameLayout, you could use a RelativeLayout, which uses z-ordering. Simply put your ImageView after your SurfaceHolder inside the RelativeLayout and it will appear overtop of it.

BigFwoosh
  • 1,197
  • 10
  • 17