同时加载资源Android应用程序闪屏 [英] Splash screen while loading resources in android app
问题描述
我想有一个闪屏,而加载的资源(图像和声音)。我怎么知道一切都是装的? 是否所有资源在应用程序启动时加载?
I'd like to have a splash screen while loading resources (images and sounds). How do I know everything is loaded? Are all resources loaded at app startup?
感谢
推荐答案
有关实施相应的启动画面中的Android要:
For accordingly implementing a splash screen in Android you want to:
- 显示前景画面与一些进度指示用户。
- 在做这需要一定的时间indefinitive执行任务后台线程。
- 在这两个线程之间进行通信,因为你需要在前台显示在背景上的进步。
- 正确杀死后台线程,当它完成这样做的任务。如果您计划使用的AsyncTask在Android中你有一个问题存在。 (链接)
- Show a foreground screen with some progress indication for the user.
- Execute a background thread for doing tasks that take some indefinitive time.
- Both threads communicating between them, as you need the foreground to show the progress on the background.
- Correctly kill the background thread when it finishes doing it's task. If you are planning to use AsyncTask in Android you have an issue there. (Link)
我发现这个教程中,我强烈建议是:<一href="http://www.41post.com/4588/programming/android-coding-a-loading-screen-part-1">http://www.41post.com/4588/programming/android-coding-a-loading-screen-part-1
I've found this tutorial and I strongly suggest it:http://www.41post.com/4588/programming/android-coding-a-loading-screen-part-1
第1部分完成这个基本任务,第2部分将向您展示如何正确地杀死AsyncTask的。和部分3把在前景代替ProgressActivity定制视图
Part 1 accomplish this basic task, part 2 shows you how to correctly kill the AsyncTask. And part 3 puts a customized view in the foreground instead of the ProgressActivity.
这篇关于同时加载资源Android应用程序闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!