sgccarey
sgccarey

Reputation: 492

How to add the camera as canvas background

I have a simple app with graphics moving about on a canvas, implemented in a surfaceview, i.e. not using an xml layout.

Is there an easy way to use the camera preview as the background?

Upvotes: 2

Views: 416

Answers (1)

stefan bachert
stefan bachert

Reputation: 9624

You could use a FrameLayout and put first your surfaceView as a child and then some other view with no/transparent background.

A FrameLayout draws its children in the order of adding.

Upvotes: 3

Related Questions