Here’s how I have my GLSurfaceView setup in a fragment:
onCreateView() {
glSurfaceView = new GLSurfaceView(getActivity());
...
}
onPause() {
if (glSurfaceView != null) { glSurfaceView.onPause(); }
...
}
onResume() {
if (glSurfaceView != null) { glSurfaceView.onResume(); }
...
}
}
So, similar to what you’d do in an activity. This works in my use case, so it seems like they do work in fragments. It’s hard to say more without knowing what your code looks like.