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

Better native predictive back animations for fragments #6973

Open
3 tasks done
Pittvandewitt opened this issue Jan 16, 2025 · 3 comments
Open
3 tasks done

Better native predictive back animations for fragments #6973

Pittvandewitt opened this issue Jan 16, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@Pittvandewitt
Copy link
Contributor

Steps to reproduce

This is more of a discussion than an a bug report.

I noticed that LibreTube (master branch) overrides the default predictive back animations that you get for free when using the navigation component. Because of this it is also not possible to override animations the usual way by setting an enterTransition or an exitTransition. Is this intended?
I created a branch yesterday with the changes I'm proposing: https://github.com/Pittvandewitt/LibreTube/tree/feat/default-animations
It is not fully implemented yet, and it takes a lot more work to do so. The enter animation should be postponed until all data is loaded in the recyclerview, among other things.

What do you think?

Expected behavior

Animations should feel "predictive" by previewing where the user would navigate to

Actual behavior

The default "exit activity" navigation is used, even in fragments

LibreTube version

0.26.0 (58)

Android version

Any

Other details

No response

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@Pittvandewitt Pittvandewitt added the bug Something isn't working label Jan 16, 2025
@Bnyro
Copy link
Member

Bnyro commented Jan 16, 2025

I noticed that LibreTube (master branch) overrides the default predictive back animations that you get for free when using the navigation component.

When I last tested it, there haven't actually been any predictive back animations between fragments, only between activities. Thus the current workaround.
It's possible that they added support for it recently though, can't tell.

@Pittvandewitt
Copy link
Contributor Author

Pittvandewitt commented Jan 16, 2025

This was the missing key: f519168#diff-890c768d5041bf31eb05673f33ad9d0ff7a42a754da46062eec65969d735c7ddR44

The animations will start looking like this by default:

video_2025-01-16_22-52-15.mp4

@Bnyro
Copy link
Member

Bnyro commented Jan 16, 2025

Awesome 👍

@Bnyro Bnyro added enhancement New feature or request and removed bug Something isn't working labels Jan 22, 2025
@Bnyro Bnyro changed the title Predictive back animations seem strange Better natvie predictive back animations for fragments Jan 22, 2025
@Bnyro Bnyro changed the title Better natvie predictive back animations for fragments Better native predictive back animations for fragments Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants