Reputation: 703
In my android app i want to show the camera view as the background of the activity screen.The widgets of the screen should display on the camera view and also must be clickable. I set the view of the activity by using the two xml by inflating them. It displays the buttons on the activity screen.I want to show the background of the activity as camera view and the buttons(which is in xml) should display on the foreground.Please help me. Thanks in advance.
Upvotes: 1
Views: 2589
Reputation: 1893
Take a look here:
http://developer.android.com/guide/topics/media/camera.html
There is all the code you need to make an activity which shows the camera preview. You simply need to put a FrameLayour as the base layout of your activity. Then add a SurfaceView with a registred SurfaceHolder.Callback handler to draw your preview on it. Finally add whichever layout or widget you need to build your own layout above itthrough the FrameLayout services.
Upvotes: 0