Paul S
Paul S

Reputation: 279

glSurfaceView and camera onResume problem

I have successfully implemented a mixed camera and glsurfaceview display. However, after pressing the home screen and returning to the app, the glsurfaceview is hidden behind the camera view (I believe). If rerunning the app from a back key press, which uses finish(), both views display ok.

Any pointers on how to reinitialise on a onResume? I am currently calling finish() in the onPause method as a workaround but this has the side effect of exiting the app when the power button is pressed or the screen turns off after an amount of time.

Upvotes: 2

Views: 1004

Answers (1)

Paul S
Paul S

Reputation: 279

Update, bringToFront() didn't really work after some extensive testing, it created other problems. However setZOrderOnTop(true) on the glSurfaceView did work.

Upvotes: 1

Related Questions