I'm programming a turntable game view by LuckyPan from github . As you see, it extends a SurfaceView
.
And here is my problem:
SurfaceView
which has a transparent background; setZOrderOnTop(true)
— I found it to make a transparent background, but it made SurfaceView
above everything in the APP; So, does anyone has a way can do one of these: Make SurfaceView
have a transparent background without using setZOrderOnTop(true)
.
OR
Set a view above the SurfaceView
which have already calling setZOrderOnTop(true)
.
Is this a bug of the SurfaceView
that always has a not transparent background unless using the setZOrderOnTop(true)
? If it is, why google hasn't fix it for more than ten years? Or is there something I missed? Thanks for helping.
Make SurfaceView have a transparent background without using setZOrderOnTop(true)
surface.setBackgroundColor(resources.getColor(R.color.transparent))
Forgot: transparent this is a color value in a colors.xml which holds a value "#0000000"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.