Hey guys, quick question. Does anyone know how to...
# compose
m
Hey guys, quick question. Does anyone know how to access the progress and cancelled state of predictive back WITHOUT overriding the system animation? What I want is to have the system animation run as intended but have some sort of callback to detect the progress and whether or not it was cancelled. I've looked at
BackHandler
and
PredictiveBackHandler
but both of them override the system animations and therefore don't do any animations...
s
I don't think that's possible. What are you trying to do here, intercept anywhere in the app or just when leaving the app? Are you using androidx.navigation for example? If yes you can probably copy-paste the NavHost implementation and just add more things inside the predictive handler that they have in there, since it's gonna be inside your code then.
m
I was afraid that was the case... I'll try to take a look and see if I find something