I posted the same comment in the relevant github commit here: https://github.com/cocos2d/cocos2d-x/commit/1f5a870149513c37c96fd3761b7ee0876a55a45d#commitcomment-1942469
Figured I would use the forum on this as well. I’m new to Android and cocos2d-x so bare with the noob questions. Thanks!
I have a question about this. In Cocos2dxActivity you made is so that it initializes it’s own Cocos2dxGLSurfaceView. This breaks the common pattern I’ve seen where you’d define a GLSurfaceView in your layout file and referencing to that in your Activity code. For example:
private Cocos2dxGLSurfaceView mGLView;
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
this.setContentView(com.smule.singandroid.R.layout.frag);
mGLView = (Cocos2dxGLSurfaceView) findViewById(R.id.game_gl_surfaceview);
… etc.
I see how this makes it easier since it’d handle all the activity related events in the superclass, but it’s not obvious to me how I can define a variable sized GLSurfaceView in my activity. How can we still achieve this with the changes made here? The reason I’d like to do this is that I still want to layer Android UI elements around the GLSurfaceView for things like menu items that I don’t want to do in Cocos2d-x. Thanks!