Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Adding a loading/splash screen

I want to know how to add an image as a loading screen to my Android app (in eclipse). I know that in iOS and XCode, you just drag in an image, and then Xcode automatically sets it just to show for as long as the app needs to load. Is there something similar in Android. Or do I need to just have an image for main activity class, then after a delay go to a different class? If so, how do I do that? Any help would be greatly appreciated!

I haven't tried coding it.

You sound like you're on the right track. Place an image in the activity you want, run a thead for a specific time then send an intent to open your main activity.

How would I do that? What's the code?

1 Answer

Probably not the answer you want to hear... but should you even have a splash screen? There are a ton of reasons not to use a splash screen.

Very good post about it here: http://cyrilmottier.com/2012/05/03/splash-screens-are-evil-dont-use-them/

If you still insist... there are a ton of tutorials on how to do this online: http://stackoverflow.com/questions/5486789/how-do-i-make-a-splash-screen-in-android

Thanks!