1
I’m drawing a graph, and for that I’m using a Class that extends from SurfaceView
.
The screen where it will be drawn has a background image.
So that the SurfaceView
be transparent, I did the following:
setBackgroundColor(Color.TRANSPARENT);
setZOrderOnTop(true);
surfaceHolder = getHolder();
surfaceHolder.setFormat(PixelFormat.TRANSPARENT);
It worked! the area of SurfaceView
was transparent, but when I give the scroll on the screen, the SurfaceView
is over the Toolbar
.
I believe it is due to the following line:
setZOrderOnTop(true);
But if removed, or Seto as false
the background turns black!
How can I leave a SurfaceView
transparent and maintain the Z
below the Toolbar
?
Did you see that answer? http://stackoverflow.com/a/7061396/2570426
– viana