Splash Activity

We are all very familiar with a splash screen for a software application. It acts like a curtain while important things are taking place behind the scenes. Ordinarily splash screens are visible until the application is ready—this could be a very brief amount of time or much longer in the case where quite a bit of housekeeping is necessary. As a rule, a mobile application should focus on economy and strive to have as little resource consumption as possible. The splash screen in this sample application is meant to demonstrate how such a feature may be constructed—we don't actually need one for housekeeping purposes. But that's okay; you can learn in the process. Two code snippets are of interest to us, the implementation of the Activity as well as the layout file that defines what the UI looks like. First, examine the layout file in listing 12.2.

0 0

Post a comment