OpenGL的视图中的布局中 [英] OpenGL view inside a layout
问题描述
我如何建立一个XML布局,其中一个OpenGL的看法是它的一部分?正如我现在要做的就是设置OpenGL的观点与的setContentView唯一的视图()。不过,我想创建一个XML的布局,包括OpenGL的看法。可以说,我想有OpenGL的观点主要是和小TextView的底部。
How do I set up an xml layout where an OpenGL view is part of it? As I do now is set the OpenGL view as the only view with setContentView(). But I would like to create an xml layout that includes the OpenGL view. Lets say I want to have the OpenGL view mainly and a small TextView at the bottom.
这甚至可能吗?或者,可以在OpenGL的观点仅是独一无二的查看?
Is this even possible? Or can an OpenGL view only be the one and only view?
推荐答案
您可以看看的 SurfaceView 。它提供了一个专用的绘图表面嵌入一个视图层次的内部。另请参见用帆布画。
You might look at SurfaceView. It provides a dedicated drawing surface embedded inside of a view hierarchy. See also drawing with canvas.
这篇关于OpenGL的视图中的布局中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!