Our Android project now needs to generate a game in activity with transparent background.
I notice that libGDX use GLSurfaceView to draw, and I know it's able to make GLSurfaceView background transparent by setZOrderOnTop(true) and getHolder().setFormat(PixelFormat.TRANSLUCENT)
But it is not working in libGDX. I guess it influences by the function Gdx.gl.glClearColor() which always invokes in render(), and it seems like the alpha channel invalid in Gdx.gl.glClearColor(). When I set transparent color Gdx.gl.glClearColor(0, 0, 0, 0), the background will always be black. And If I delete this, the render result comes to error.
So I wonder is there a way to make libGDX background transparent?
Thank you all.
I finally made libGDX background transparent by the following code:
And I find a good way to discuss what you want about libGDX by Discord.