I have an FragmentActivity
where I switch a fragments. One of my fragments contains GLSurfaceView
. Everithing works well except first appearance of fragment that contains GLSurfaceView
. It turns whole the activity area (notification bar and buttons in the bottom of the screen are not included) goes black for few millis. The most interesting is that GLSurfaceView
does not take all the fragment's area and the fragment does not take all the activity's are but all of them blink with black color and another interesting thing is that it happens only for the first time until activity recreates. I marked GLSurfaceView
with blue
Fragment
with green
and Activity
with red
colors.
Android native controls does not blink with black color.
Does anyone know what happens here or at least how to debug this behaviour ?
UPD: I create Fragment without GLSurfaceView and it works perfect. Then I add a GLSurfaceView
on touch a button and it blink when I do mRootView.addView(mGLSurfaceView);
and also only for the firs time.