Graphics Programs Reference
In-Depth Information
Figure 2-10 . setContentView with button-view
We saw in Chapter 1 that the setContentView method can set an OpenGL sur-
face as the activity's content view. This is possible because GLSurfaceView ( an-
droid.opengl.GLSurfaceView ) is a subclass of View .
On Android, all OpenGL rendering is hosted by GLSurfaceView . To modify
this rendering using visual elements like button-views, we must separate them from
GLSurfaceView . Android provides a convenient way to do so, using the ad-
dContentView method ( addContentView(View view, LayoutParams
params) ).
 
Search WWH ::




Custom Search