GLSurfaceView turns black during fragment transition

385 views Asked by At

In one fragment in my app, I use a GLSurfaceView to render a 3d model. When this Fragment is visible, the user can navigate to another Fragment from it. While that Fragment transition happens, the whole GLSurfaceView turns black.

I started having this problem when I changed from setZOrderOnTop(true) to false. I understand the difference this makes, but It's not possible for me to use setZOrderOnTop(true) (I Have other Views and animations that needs to overlay the GLSurfaceView).

I have tried everything I could think of and everything related from Google searches, such as using backgrounds, hiding the view, replacing it with dummy view during transition etc. without any luck.

Does anyone have an idea how I can solve this?

Notes:

  • I must not use setZOrderOnTop(true)
  • I use Support Fragments
  • I'm currently testing this on a Sony xperia z3, running 6.0 marshmallow
  • The only time I have this issue is when transitioning from the fragment with the GLSurfaceView, not when I transition to it.
  • My Renderer uses glClear(..) to color render the whole view in a white color. My issue is not in the GL Code
0

There are 0 answers