Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

Thanks

like image 809
jul Avatar asked Feb 16 '11 15:02

jul


People also ask

How do I make a splash screen app for Android?

The most straightforward way to create a simple splash screen was to create a dedicated theme overriding android:windowBackground with a drawable containing branding colors or a bitmap of a logo. The theme was set as an attribute of the launcher activity in AndroidManifest. xml.

Is splash screen the same as loading screen?

A splash screen, also known as a launch screen, is the first screen that a user sees when opening your app, and it stays visible while the app is loading. You can control when the splash screen disappears by using the native SplashScreen API.

Does Android have a splash screen?

Android Splash Screen is the first screen visible to the user when the application's launched. Splash screen is one of the most vital screens in the application since it's the user's first experience with the application.


1 Answers

For accordingly implementing a splash screen in Android you want to:

  1. Show a foreground screen with some progress indication for the user.
  2. Execute a background thread for doing tasks that take some indefinitive time.
  3. Both threads communicating between them, as you need the foreground to show the progress on the background.
  4. 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)

I've found this tutorial and I strongly suggest it:http://www.41post.com/4588/programming/android-coding-a-loading-screen-part-1

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.

like image 84
Sebastian Juarez Avatar answered Sep 28 '22 03:09

Sebastian Juarez