Skip to content Skip to sidebar Skip to footer

How Can I Use Glsurfaceview In A Linearlayout Together With Other Views, Such As Textview Or Button?

I'm doing a small game on Android 2.3.3 and I want to use openGLES. My question is whether I can GLSurfaceView and TextView, Button in the same layout. My layout xml file is as the

Solution 1:

When extending View or in this case GLSurfaceView you might need to place the correct constructor.

In your case you are missing this one:

publicGameView(Context context, AttributeSet attrs)

You can check how it's done inside cocos2d-x with the Cocos2dxGLSurfaceView.

Post a Comment for "How Can I Use Glsurfaceview In A Linearlayout Together With Other Views, Such As Textview Or Button?"