I'm working on a special UI in Android -Sandwich type, a small GalleryView on GLSurfaceView(with transparent areas) on top of background View (LinearLayout+some widgets). This is how I'm thinking of setting it up:
<User>
TOP View
---GalleryView
|
---GLSurfaceView(with transparent areas)
|
---LinearLayout(with widgets)
BOTTOM View
In regular mode GLSurfaceView have black background on transparent areas, so I cannot see the bottom layer,but when I use setZOrderOnTop(true); I can see bottom layer, but the top layer (gallery) also goes behind Glsurface view. How can I accomplish desired view like in schema?
XML code dummy Example(with AnalogClock instead of GalleryView):
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#920000"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/LinearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right" >
<AnalogClock
android:id="@+id/analogClock2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<com.test.CustomGlView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gl_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<AnalogClock
android:id="@+id/Gallery_dummyview"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>