Hello, i am trying to place a layout behind of_gl_surface_container in android and make of_gl_surface_container transparent, so that i can draw things to the surface while seeing whats on the view behind the surface.
I tried making clear color ofClear(ofColor(0, 0, 0, 0))
and setting of_gl_surface_container background color to transparent. But it does not work. Can i please know whether this is possible or not?
My draw function:-
void ofApp::draw(){
ofColor clearColor;
clearColor.r = 0;
clearColor.g = 0;
clearColor.b = 0;
clearColor.a = 0;
ofClear(clearColor);
ofSetColor(0, 255, 0, 125);
ofDrawRectangle(50, 50, 100, 100);
}
My XML:-
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/sd"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/holo_green_light" />
<RelativeLayout
android:id="@+id/of_gl_surface_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/clearColor"/>
<!-- add here other views' layouts -->
</RelativeLayout>