Black flicker once when adding GLSurfaceView

I use GLSurfaceView inside CompoundView to implement fancy navigation. Currently, GLSurfaceView is created when a subsection is selected, and not at the beginning.

My problem is that the screen instantly flickers when GLSurfaceView is first created. It does not flicker when choosing another subsection; in this case, the current GLSurfaceView is discarded and another is created.

This, of course, is very annoying, especially because it flickers in black on a very light topic. I think in most cases this would not make any difference because GLSurfaceViews is usually full-screen and quite durable, but in this case it is a traditional Android application that opens and closes actions all the time.

Is there any way around this? Like the initialization of OpenGl when creating activity (I assume that flickering will not be as annoying)?

+7
source share

All Articles