I have a request that background for my activity must be “transparent”, ie. background of an activity should be camera’s current view. What is the easiest way to implemet this?
I have all the activities already implemented, with all the logic already implemented. Ideally, solution wouldn’t include a lot of modification of an existing code.
I have a request that background for my activity must be transparent, ie. background
Share
Normally this is done with
SurfaceView. Use it viacamera.setPreviewDisplay(surfaceView)To use it in your app, the simplest way would be to use
FrameLayoutas a top layout of your Activity and then putSurfaceViewany you current top layout inside it.Of course your existing layout must be transparent to see the underlying
SurfaceView. Note also that this alpha blending takes a lot of processor power so it will eat battery.