You can try this sample just for invalid animation in changing activities: https://github.com/SwayChen/InstantAppTest.
I have tag a TODO
on both onCreate()
& onBackPressed()
[ app module works fine, the feature-a not ]
The following is some short descriptions.
overridePendingTransition
work fine in app/library module.
But now it can't work in feature module, it just have flicker animation when start Activity.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
overridePendingTransition(R.anim.slide_in_right, R.anim.none);
}
The following is the two animation XML:
R.anim.none:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="400"
android:fromXDelta="0%"
android:toXDelta="0%" />
</set>
R.anim.slide_in_right:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="320"
android:fromXDelta="-100%"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toXDelta="0%" />
</set>