创建一个合适的Andr​​oid飞溅/载入画面 [英] Creating a proper Android Splash/Loading screen

查看:129
本文介绍了创建一个合适的Andr​​oid飞溅/载入画面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个GLSurfaceView使用OpenGL的应用程序。问题
是初始负载需要相当长的一段处理纹理和
收拾东西准备好了。

I have an application that uses OpenGL on a GLSurfaceView. The problem is that the initial load takes quite a while processing textures and getting things ready.

我想要做的是有一个简单的PNG显示(有轻微
动画),而GLSurfaceView正准备。只要它是
准备渲染,我想推倒闪屏。

What i want to do is have a simple PNG displayed (with a slight animation) while the GLSurfaceView is getting ready. As soon as it's ready 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, ViewSwitcher and a bunch of other things to switch between my R.layout.main view and 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

这篇关于创建一个合适的Andr​​oid飞溅/载入画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆