向上滚动并在RecyclerView

时间:2016-05-24 04:04:33

标签: android opengl-es android-recyclerview glsurfaceview rajawali

我在GLSurfaceView项目布局中添加了自定义RecyclerView's。当我向上滚动并再次向下滚动时,GLSurfaceView消失了。我使用Rajawali 3D引擎的Android操作系统。

这是ViewHolder

中的recyclerView Adapter
class FieldViewHolder extends RecyclerView.ViewHolder {
        ISurface customizeSurfaceView;
        CardView cardView;

        public FieldViewHolder(View itemView) {
            super(itemView);
            this.customizeSurfaceView = (ISurface) itemView.findViewById(R.id.surfaceView);
            this.cardView = (CardView) itemView.findViewById(R.id.cardviewField);
            RendererClass rendererClass = new RendererClass(context);
            customizeSurfaceView.setSurfaceRenderer(rendererClass);
        }
    }

在我的Logcat中,我发现了那些错误:

Could not link program in org.rajawali3d.materials.Material: 
Getting location of uniform: uModelMatrix returned -1!
E/Rajawali: Getting location of uniform: uTime returned -1!

[org.rajawali3d.materials.Material] Could not compile vertex shader:
 Shader log: Vertex shader compilation failed.
ERROR: 0:7: '=' : Syntax error:  syntax error
ERROR: 1 compilation errors.  No code generated.

这就是我启动应用程序时的样子 enter image description here

当我向上滚动并再次向下滚动时: enter image description here

0 个答案:

没有答案