[英]Android GLSurfaceView
Is it possible add LinearLayout on GLSurfaceView? 可以在GLSurfaceView上添加LinearLayout吗? How to overlay LinearLayout over a GLSurfaceView? 如何在GLSurfaceView上叠加LinearLayout? maybe GLSurfaceView is Game playground and LinearLayout is menubar~ 也许GLSurfaceView是Game playground,LinearLayout是菜鸟〜
Use a FrameLayout. 使用FrameLayout。 Have the GLSurfaceView as the first view in the FrameLayout, then add the LinearLayout second. 将GLSurfaceView作为FrameLayout中的第一个视图,然后添加LinearLayout秒。 This will put the linearLayout and anything in it over the top of the GLSurfaceView: 这会将linearLayout及其中的任何内容放在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: 编辑:现在有了图片:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.