Hi,

I understand you want to show a splash screen.

Here is how i do it.

I have a relativelayout containing my UI in a framelayout.

The background of the framelayout is set to the picture for the
splash.
I have an animation on the relativelayout from 0 alpha to 1 alpha with
a startoffset of 2 seconds and a duration of 1 second. Don't forget to
put the fillbefore to true as well.
Which means that the splash will appear for 2 seconds then the alpha
of the UI will increment until it reaches full opacity and hides the
splash in 1 seconds.

I start the animation in my oncreate method.

My xml in /res/anim/reveal.xml
<set xmlns:android="http://schemas.android.com/apk/res/android";
fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
>
      <alpha android:fromAlpha="0"
             android:toAlpha="1"
             android:startOffset="2000"
             android:duration="1000"  />

</set>

This is not perfect since it doesn't depend on your application
finishing to load itself. But you could use the same principle and
just trigger the animation when your initialization is done.

Yahel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to