Compose predictive back Android


I’m working on a fully Compose, single-activity project using Navigation Compose (Nav2), and I’m trying to implement predictive back.

The issue is: when I start the predictive back gesture, the animation begins correctly. But if I cancel the gesture before navigating back, the app stays on the current screen as expected. However, on the next back gesture, the popExit and exit animations seem to get swapped, which makes the transition look wrong.

I also tried reproducing this in a simple project with both Nav2 and Nav3, but the issue still happens.

Has anyone experienced this before? Is there a known workaround or correct way to handle predictive back animations in Compose Navigation?

0
May 27 at 2:26 PM
User AvatarАлександр Правдин
#android#navigation#compose

No answer found for this question yet.