Found that some people ask the same thing, but the solutions did not work for me.
I do not see the animation.
The call 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 animation 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>
Use min. API 7:
manifest:
<uses-sdk android:minSdkVersion="7"/>
API 7 is also located in the project.properties file:
target=android-7
What am I doing wrong?
PD Deleting lines using the interpolator does not change anything.
Already seen / tried:
overridePendingTransition not working
overridePendingTransition does not work when using FLAG_ACTIVITY_REORDER_TO_FRONT
Fade in Activity from previous activity in Android
Fade in Activity from previous activity in Android
Android Activity Transition
source
share