Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/214.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何设置ImageView的SurfaceView覆盖_Android_Android Layout_Opengl Es - Fatal编程技术网

Android 如何设置ImageView的SurfaceView覆盖

Android 如何设置ImageView的SurfaceView覆盖,android,android-layout,opengl-es,Android,Android Layout,Opengl Es,我想在ImageView上设置SurfaceView。我使用了下面的代码和布局。它将曲面视图设置在imageview上,但将surfaceview设置为所有视图的顶部 是否有其他方法可以在ImageView上设置SurfaceView 请帮帮我 代码: setEGLConfigChooser(8, 8, 8, 8, 16, 0); getHolder().setFormat(PixelFormat.TRANSLUCENT); setZOrderOnTop(true); 布局 <Frame

我想在ImageView上设置SurfaceView。我使用了下面的代码和布局。它将曲面视图设置在imageview上,但将surfaceview设置为所有视图的顶部

是否有其他方法可以在ImageView上设置SurfaceView

请帮帮我

代码:

setEGLConfigChooser(8, 8, 8, 8, 16, 0);
getHolder().setFormat(PixelFormat.TRANSLUCENT);
setZOrderOnTop(true);
布局

<FrameLayout
    android:id="@+id/topFrameLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <!-- ImageView for the product -->

    <ImageView
        android:id="@+id/photoImageView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <com.amplimesh.renderer.RendererView
        android:id="@+id/renderer_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent" />

确保添加

gl.glClearColor(0.0f, 0.0f, 0.0f, 0);

在渲染器中,确保背景是透明的。

即使它显示黑色,我也会设置它。因此,GLSurfaceview后面的imageview不可见。请帮助我如何使imageview可见