I am making a game in LibGDX, and I noticed that when my game is running, the black screen is displayed for a few seconds until the white screen of my game is drawn.
I set the background color of my application to a different color with android:windowBackground in my application style.xml , and the preview window shows this color. However, before the main screen of my application loads, the screen will appear black before displaying the main screen.
I tried setting Gdx.gl.glClearColor(1,1,1,1) in the main activity and game class in my game, but the black screen still shows for a moment before drawing the main screen.
The only way I decided to fix this is to set the android:windowDisablePreview to true, but this completely disables the preview window.
Is there a way to fix this without disabling preview?
source share