splash_animation.xml
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <animation-list xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/splashAnimation"
- android:oneshot="false">
- <item android:drawable="@drawable/splash1" android:duration="3000" />
- <item android:drawable="@drawable/splash2" android:duration="50" />
- <item android:drawable="@drawable/splash3" android:duration="50" />
- <item android:drawable="@drawable/splash4" android:duration="50" />
- <item android:drawable="@drawable/splash5" android:duration="50" />
- <item android:drawable="@drawable/splash6" android:duration="50" />
- <item android:drawable="@drawable/splash7" android:duration="50" />
- <item android:drawable="@drawable/splash8" android:duration="50" />
- <item android:drawable="@drawable/splash9" android:duration="50" />
- <item android:drawable="@drawable/splash10" android:duration="50" />
- <item android:drawable="@drawable/splash11" android:duration="50" />
- <item android:drawable="@drawable/splash12" android:duration="50" />
- <item android:drawable="@drawable/splash13" android:duration="50" />
- <item android:drawable="@drawable/splash14" android:duration="50" />
- <item android:drawable="@drawable/splash15" android:duration="5000" />
- </animation-list>
Parsed in 0.006 seconds, using GeSHi 1.0.8.4
This would go somewhere in your code, like the onCreate function if you want it to fire off when your app starts
Using java Syntax Highlighting
- ImageView animation = (ImageView) findViewById( R.id.splashAnimation );
- animation.setBackgroundResource( R.drawable.splash_animation );
- AnimationRoutine animationRoutine = new AnimationRoutine( );
- Timer t = new Timer( false );
- t.schedule( animationRoutine, 100 );
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
Using java Syntax Highlighting
- private class AnimationRoutine extends TimerTask {
- AnimationRoutine( ) { }
- public void run( ) {
- ImageView img = (ImageView) findViewById( R.id.splashAnimation );
- AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground( );
- frameAnimation.start( );
- }
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
Anyway, I hope that helps someone, I was having a hell of a time finding a good way to get it to work...





