overridePendingTransition doesn't work
Posted
by
Ixx
on Stack Overflow
See other posts from Stack Overflow
or by Ixx
Published on 2012-07-06T14:59:52Z
Indexed on
2014/05/26
21:26 UTC
Read the original article
Hit count: 176
Have found already some people asking the same, but the solutions didn't work for me.
I see no animation.
Calling it this way:
Intent intent = new Intent(this, MyActivity.class);
startActivity(intent);
overridePendingTransition(R.anim.fadein, R.anim.fadeout);
fadein.xml and fadeout.xml are in the anim folder:
fadein.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >
<alpha
android:duration="1000"
android:fromAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:toAlpha="1.0" />
</set>
fadeout.xml:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha
android:duration="1000"
android:fromAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:toAlpha="0.0" />
</set>
Using min. API 7:
manifest:
<uses-sdk android:minSdkVersion="7"/>
API 7 is also in my project.properties file:
target=android-7
What am I doing wrong?
P.D. Removing the lines with the interpolator doesn't change anything.
Already seen / tried:
overridePendingTransition doesn't work
overridePendingTransition does not work when flag_activity_reorder_to_front is used
Fade in Activity from previous Activity in Android
© Stack Overflow or respective owner