For my live wallpaper I want to change the exit animation for the settings activity. By default, when exiting the activity, it simultaniously scales down to the center and fades out. I want it to just fade out, with no resizing involved.
I've tried defining my own animation settings in styles.xml
. Setting android:windowExitAnimation
to @android:anim/fade_out
does not seem to do what I want. The animation still scales down before it is faded out. I've tried countless of other animation settings, such as android:activityCloseExitAnimation
, but none of them seem to get rid of the resizing behaviour I explained above.
Also, overridePendingTransition(0, R.anim.abc_fade_out);
has the same result: the activity still scales down when exiting.
Is there any way to override this default animation behaviour, so that the exit animation doesn't involve resizing?
If not, is it possible to entirely remove the exit animation, so that the application dissapears instantly?
You should try to override the finish
method inside your Activity
as follows:
@Override
public void finish() {
super.finish();
overridePendingTransition(0, R.anim.abc_fade_out);
}
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