Well I have been researching this thoroughly and I cannot seem to come up with a solution.
I've realized now that this is an OpenGL problem and not an Android problem. The way that I was achieving this before was "faking" the effect. I was making the ENTIRE activity TRANSLUCENT in the Android Manifest file (ex. android:theme="@android:style/Theme.Translucent.NoTitleBar").
By doing this, I was making Activity 3 translucent while Activity 2 was still running, thereby creating the illusion that Activity 3 was "hovering" over Activity 2.
That's not what I want to do. I want it to be one single activity.
On various forums, there are a couple of suggestions, none of which achieve what I am trying to do:
Method 1: Draw a full-screen quad that has the background image (in my case the gradient) applied to it as a texture map. Don't want to do this, would rather use my RelativeLayout XML which has android:background="@drawable/all_bggradient" already specified. And I know that adding another object and applying textures adds more code.
Method 2: Use a combination of the GL_BLEND function implementing GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA and setting glClearColor to 0,0,0,0. Unfortunately it seems that this method effects only my cube (foreground) object, and not the background. I want to clear to an image NOT a color.
Method 3: Create a new RelativeLayout, add the GLSurfaceView as the first child, and then add all other views AFTER this view. This method will stack all of the other views on top of the GLSurfaceView. Again, good suggestion however I want my background image to appear BELOW the OpenGL cube and every other view.
So basically I am stuck. Does anyone know if there is a better way to do this? Reiterating, I want to have ONLY a 3D cube rotate on my screen and NOT have ANY background color. I want the OpenGL background to transparent.
Thanks in advance for any help.