3

I'm learning openGL. I have a background layout with 3D object and a HUD layer with some button. The HUD layer have to stay top.

I set my SurfaceView to transparent, but need use setZOrderOnTop(true) for the transparent SurfaceView. Then the 3D object cover the HUD. How "convert" my SurfaceView to transparent without change the zindex? I read all similar topic in StackOverflow, but didn't help.

  • bringtofront(), not help for me
  • getHolder().setFormat(PixelFormat.RGBA_8888), not help for me

pls don't link other topic because I read all.

fadden
  • 51,356
  • 5
  • 116
  • 166
Cipo
  • 161
  • 2
  • 14
  • `setZOrderOnTop()` just changes the Z-ordering of the layer, so that it's in front of the View UI layer. It has no effect on transparency. If the SurfaceView's Surface is behind everything else, though, transparency doesn't matter, because there's nothing behind it to show through. I'm not sure what you're trying to do. – fadden Oct 05 '15 at 01:02
  • zorder necessary for transparent SurfaceView. Look this: http://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transparent – Cipo Oct 05 '15 at 19:14

1 Answers1

1

setZOrderOnTop() works, but it means that you cannot have anything above a transparent SurfaceView, which is unfortunate.

Manuel Schmitzberger
  • 5,162
  • 3
  • 36
  • 45