0

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>
SwayChen
  • 21
  • 8
  • @ SwayChen, `overridePendingTransition` when used with Feature Module (and project run as an Android Instant App) results in similar behavior at my end too. I would suggest you to submit your project to Google's [Issue-tracker](https://issuetracker.google.com). They will take a look at it. (also, please share the link to that filed bug here) – ManmeetP Dec 13 '17 at 04:38
  • 1
    ok, I have post a issue: https://issuetracker.google.com/issues/70650534 – SwayChen Dec 14 '17 at 07:20
  • Thank you, we can hope for a response soon. – ManmeetP Dec 14 '17 at 07:25

1 Answers1

0

Good news! The engineers have fixed the issue, overridePendingTransition animation now works with Instant Apps on O+ devices.

The custom transition animation is not supported in AIA on pre-O devices and there are currently no plans to support this in near future.

Please report AIA Team if you encounter any issues.

Prags
  • 2,457
  • 2
  • 21
  • 38