Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically the question is in the title.

I'm creating a RTS game and I will need buttons like attack move / attack ground, etc. I am not using any engine.

When people do games in OpenGL for android (my case), do they ever use android components to control the game or do they create their components in the game? What are the general recommended approach, if there's any? How about more complex components like scrolling lists of items , etc? I would also appreciate you to pair your answer with a brief comment about how was your experience using the approach(es) you describe.

Thanks :)

share|improve this question
I would say create your own set of UI controls. This way you can easier theme them, add effects to them, etc. But this is just based on my experience, and I've done very little android programming. – hayer Sep 26 '12 at 6:27

You can add your controls using ImageView, View to your SurfaceView like if this one was a RelativeLayout.

With this method you will easily track touchEvent, OnClick etc...

Well this is how I do for my game and it works well !

NB: I didn't try with ListView etc... but if you customize its UI to have the same look as your game I don't see where the problem can be.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.