# Is it possible to overlay EditText box on a GLSurfaceView on Android?

I am trying to add a "PlayerName" box on top of a opengl menu background, is this possible? I've tried various layouts, but they don't seem to allow an EditText box to appear on top

What is the typical way of doing something like this? Do I need to manually render the text and handle input or is there a better way? It seems like it should be possible to show the EditText on top of the GLSurfaceView somehow.

• I ended up implementing an EditBox manually to deal with text input. It wasn't too difficult although not as full featured as I'd like. – Ash McConnell Apr 21 '11 at 13:23

I found the correct way of doing this (This code is in the Activity class)

view = new MyGLSurfaceView(this, gameHandler);
editBox = new EditText(context);
editBox.setText("Hello Matron");

view.setRenderer(new OpenGLRenderer(gameHandler));
setContentView(view);