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

Back animations sped up + stop working when interrupted in the middle #288

Open
LukasAnda opened this issue Mar 17, 2024 · 2 comments
Open

Comments

@LukasAnda
Copy link

Describe the bug
When I navigate to another screen and force the animations to be intentionally 3 seconds long, when I press back (on Android), it does not play the animation in the same speed, but only some sped-up version. This issue only happens when using native back button (on emulator for example) and not when calling navigateUp. Also, when I navigate back using system button during this long animation, the whole navigation breaks.

To Reproduce
Steps to reproduce the behavior:

  1. Pull code from here: https://github.com/LukasAnda/Plank-Timer/tree/main
  2. Uncomment animation code in AppNavigation file
  3. Run the Android app.
  4. Navigate to settings and then (while the animation is running) navigate back.
  5. Try to navigate once again to no avail.

Expected behavior
Navigation animations work correctly regardless of if I navigate up using code or system buttons.

Minimal reproducible example
Mentioned in the first step

@Tlaster
Copy link
Owner

Tlaster commented Mar 22, 2024

I am still trying to find the root cause of this.
Another case is that if you try to navigate to another scene while the transition is running, the transition also seems to be incorrect.

@VerushkinRoman
Copy link

If i use androidx.activity.compose.BackHandler in actual android implementation, animation works as expected. But if I replace it with moe.tlaster.precompose.navigation.BackHandler, animation speed up

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

No branches or pull requests

3 participants