I can do the fade out. But not the shrink. I want it to look like it's going into the distance far, far away.
I want an animation similar to the one used in www.screamintothevoid.com
That should work like you want it.
animation.xml in /res/anim
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXScale="1"
android:toXScale="0"
android:fromYScale="1"
android:toYScale="0"
android:duration="5000"
android:pivotX="50%"
android:pivotY="50%" >
</scale>
<alpha
android:fromAlpha="1"
android:toAlpha="0"
android:duration="5000" >
</alpha>
</set>
to call this animation:
TextView textView = (TextView) findViewById(R.id.text_view);
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.animation);
textView.startAnimation(animation);
To shrink a view change its scale values, for example:
TextView textToShrink = (TextView) findViewById(R.id.text_to_shrink);
textToShrink.animate().scaleX(0.3f).scaleY(0.3f).setDuration(600).start();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With