What about rendering controls in the actual OpenGL or 2D graphics scene, for example a free floating button or text field in the middle of the screen.
The reason I'm asking is that in the desktop world, gaming engines usually have their own Game UI control libraries. Now, in Java2D/Swing it was possible to do some of this because the Swing controls are lightweight. I'm not sure if the Android controls are lightweight or not, so wondering if you guys know a bit about this (I realize the book is not about gaming, but hopefully you get what I mean).
I see the dilemma. I don't know the answer.
All I know is OpenGL drawing occurs on a special view called GLSurfaceView which itself is derived from a View. Here is what the doc says about this view
Manages a surface, which is a special piece of memory that can be composited into the Android view system
Provides a dedicated drawing surface embedded inside of a view hierarchy. You can control the format of this surface and, if you like, its size; the SurfaceView takes care of placing the surface at the correct location on the screen
The surface is Z ordered so that it is behind the window holding its SurfaceView; the SurfaceView punches a hole in its window to allow its surface to be displayed. The view hierarchy will take care of correctly compositing with the Surface any siblings of the SurfaceView that would normally appear on top of it. This can be used to place overlays such as buttons on top of the Surface, though note however that it can have an impact on performance since a full alpha-blended composite will be performed each time the Surface changes.
It may be obliquely pointing to what you are refering to.
For a 2D view, what I'm thinking is maybe I can pass the Canvas object to the onDraw method of a GUI control. I'm just getting started on Android so sorry, haven't tried out a bunch of these things, just trying to move from the Swing world :-)
I am quite jealous of the EXTENSIVE graphics API in Android. Probably the most extensive of the Android APIs. You can see this from the sample programs that come with the android sdk.
However having spoiled by the web for so many years I haven't had a chance to cover the graphics API much as I will need to refresh the basic drawing principles on a canvas and using the drawable views etc. Not sure at all when I will get a chance to do that at this moment.
This is one area that needs a good short book