Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8448933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:33:32+00:00 2026-06-10T10:33:32+00:00

So I have a GLSurfaceView in my app being rendered by a GLSurfaceView.Renderer and

  • 0

So I have a GLSurfaceView in my app being rendered by a GLSurfaceView.Renderer and using JPCt as library.

The surface is in an invisible RelativeLayout (visibility: gone). When I change the visibility to “visible” then back to “gone”, the layout shows and hides as expected, but the GLSurfaceView don’t, it just shows and won’t hide, even though I can click on items that are now “behind” it.

It seems like some graphical buffer issue, but I didn’t find a way to get this to work… any ideas?
Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:33:34+00:00Added an answer on June 10, 2026 at 10:33 am

    SurfaceView (and GLSurfaceView by extension) are interesting beasts in Android. Citation from Android javadoc:

    The surface is Z ordered so that it is behind the window holding its
    SurfaceView; the SurfaceView punches a hole in its window to allow its
    surface to be displayed. The view hierarchy will take care of
    correctly compositing with the Surface any siblings of the SurfaceView
    that would normally appear on top of it

    Android has a built-in window compositor (window has a bit different meaning here). Your status bar is a window, your activity has one window. But if your activity contains a surface view, another window is created, just to hold the surface, and android compositor draws the window with your views over the surface window. So the SurfaceView is really only a transparent area. When you hid it, the area is not drawn, does not react to touches, but the surface window is still present, android is not clever enough to hide the window.

    I would recommend two solutions

    • Make your surface translucent. You can then render empty surface when you need to hide the view( Android, Transparent sub-GLSurfaceView in layout? )
    • Remove the view from view hierarchy altogether
    • Another a bit hacky way is to subclass GLSurfaceView and call onDetachedFromWindow() when visibility changes to GONE. I have not tested this and it might not work.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a GLSurfaceView, that has a texture that i need to change when
I have a Activity class and a Renderer class (extends GLSurfaceView implements Renderer). Inside
i have a glsurfaceview renderer with some code that allows me resume after press
I have a an app whose Main activity shows a GLSurfaceView . Every time
I have a GLSurfaceView where I show some animations using OpenGL. I now want
I have an app: 3D Cube (OPENGLES) with touch and key support. I'm using
I have extended the GLSurfaceView and implemented my own GLSurfaceView.Renderer to create my first
I am trying to create a simple 3-D app for android that will have
The GLSurfaceView.Renderer interface of the Android SDK gives me a GL interface as parameter
I have a couple questions on playing videos in android. Currently I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.