Skip to content Skip to sidebar Skip to footer

How To Build A Gui/hud Over Top A Glsurfaceview In Android

I have an glSurfaceView that looks like this: public class GLLayer extends GLSurfaceView implements SurfaceHolder.Callback, Camera.PreviewCallback, Renderer { private Context

Solution 1:

After almost a year I came back to this and found the following solution to work like a charm.. I know many have battled with this same issue so I thought I'd share to save anyone the aggravation I endured.

Simple: before adding my views to the frame layout I set the glView's zOrderMediaOverlay to TRUE like so:

glView.setZOrderMediaOverlay(true);
rel.addView(camPreview, camParams);
rel.addView(glView, glParams);
rel.addView(imageView, imageParams);

Post a Comment for "How To Build A Gui/hud Over Top A Glsurfaceview In Android"