Is it possible add LinearLayout on GLSurfaceView? How to overlay LinearLayout over a GLSurfaceView? maybe GLSurfaceView is Game playground and LinearLayout is menubar~
Use a FrameLayout. Have the GLSurfaceView as the first view in the FrameLayout, then add the LinearLayout second. This will put the linearLayout and anything in it over the top of the GLSurfaceView:
<FrameLayout
android:id="@+id/graphics_frameLayout1"
android:layout_width="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent">
<android.opengl.GLSurfaceView
android:id="@+id/graphics_glsurfaceview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</android.opengl.GLSurfaceView>
<LinearLayout
android:layout_height="fill_parent"
android:id="@+id/linearLayout1"
android:gravity="center"
android:layout_width="fill_parent"
android:orientation="vertical">
</LinearLayout>
</FrameLayout>
Edit: Now with picture:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With