Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default animations #7053

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Pittvandewitt
Copy link
Contributor

@Pittvandewitt Pittvandewitt commented Jan 30, 2025

This PR reverts to the default animations now that the NavHost is using them. This results in somewhat better predictive back navigation. It doesn't yet use the material3 recommended animation patterns, but that is for a future commit. Before those animations can be implemented, a lot needs to be changed to make sure all data is loaded before the animation starts. (Using Fragment.postponeEnterTransition and Fragment.startPostponedEnterTransition)

closes #6973

@Bnyro
Copy link
Member

Bnyro commented Feb 3, 2025

I'm on Android 15, and with these changes the predictive back animations between fragments are completely gone on my device. Activity animations still work, so it's certainly not a general predictive back issue but rather specific to this PR.

I don't have a clue why things don't work the same as in the screen recording you shared on my end 🤷‍♂️

@Pittvandewitt
Copy link
Contributor Author

I ran the code changes on real devices running Android 15 and 16, both working as expected. It also works using an emulator. Maybe Android Studio is using an old cache in your case? Attached an apk built from this branch to double check
app-arm64-v8a-debug.apk.zip

@Bnyro
Copy link
Member

Bnyro commented Feb 10, 2025

I ran the code changes on real devices running Android 15 and 16, both working as expected. It also works using an emulator. Maybe Android Studio is using an old cache in your case? Attached an apk built from this branch to double check app-arm64-v8a-debug.apk.zip

Yes, even with a clean install, I tested the apk you provided.

@FineFindus if you have time and motiviation, could you please test this as well on a real device that supports predictive back gestures? I'm asking because I remember that you've been looking into the predictive player back animation recently and thus likely have a device to test it. (No pressure though!)

@FineFindus
Copy link
Contributor

Tested with the attached apk, works fine for me (though I noticed that the Watch History/Downloads pages no longer have any back animation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better native predictive back animations for fragments
3 participants