问题描述
我有一个GLSurfaceView使用OpenGL的应用程序。问题
是初始负载需要相当长的一段处理纹理和
收拾东西准备好了。
I have an application that uses OpenGL on a GLSurfaceView. The problemis that the initial load takes quite a while processing textures andgetting things ready.
我想要做的是有一个简单的PNG显示(有轻微
动画),而GLSurfaceView正准备。只要它是
准备渲染,我想推倒闪屏。
What i want to do is have a simple PNG displayed (with a slightanimation) while the GLSurfaceView is getting ready. As soon as it'sready to render, i would like to tear down the splash screen.
什么是做到这一点的正确方法?我试过ViewFlipper,ViewSwitcher
和一堆其他的事情我R.layout.main视图之间切换
我GLSurfaceView但我似乎无法得到它的权利。
What is the right way to do this? I've tried ViewFlipper, ViewSwitcherand a bunch of other things to switch between my R.layout.main viewand my GLSurfaceView but i can't seem to get it right.
任何想法?
推荐答案
第1步:使你的 GLSurfaceView
是安卓知名度=隐形在布局XML
第二步:把那只 GLSurfaceView
内部的的FrameLayout
Step #2: Put that GLSurfaceView
inside of a FrameLayout
第三步:添加的ImageView
作为另一个孩子在同一个的FrameLayout
Step #3: Add an ImageView
as another child of the same FrameLayout
第四步:当 GLSurfaceView
准备好,让的ImageView
是不可见,并在 GLSurfaceView
可见
Step #4: When the GLSurfaceView
is ready, make the ImageView
be invisible and make the GLSurfaceView
be visible
这篇关于创建一个合适的Android飞溅/载入画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!