Who knows why there are no dim/black out animation...
# compose
k
Who knows why there are no dim/black out animations? https://developer.android.com/develop/ui/compose/animation/composables-modifiers#enter-exit-transition with the current API I am not able to configure slide+dim navigation animation. Or I am wrong?
r
How do you define a dim/black out animation in your case?
(what I mean is: what would the visual result be, just to understand your question)
f
k
something like an animation of the foreground here
I would like to apply the animation to the previous screen with a predictive back
s
The current navhost does not support exposing the animation process, so it seems difficult to implement this feature
k
@Jeremy Woods @romainguy is it possible to do something here?
j
@Doris Liu is this type of thing possible with animations? Is there more we would need to expose at the Navhost?
d
You could specify an Enter/ExitTransition on any layout in an AnimatedVisibilityScope (i.e. if you use
AnimatedVisibility/AnimatedContent
) using
Modifier.animateEnterExit
. Is this more than a simple fade out of the black background?
s
I want to make the predictive back gesture animation different from the normal navigation back animation, but this cannot be achieved in the current navhost api. For example, the normal navigate back is MaterialAsixX animation, while the predictive back gesture animation is implemented according to the official predictive back gesture animation(scale small and offset x and y depends back gesture position and progress).
k
One more case: to make a different predictive back gesture animation depending on the gesture side
at the moment there is no way to redefine the internal back handler in the compose NavHost
CMP-4528 Make iOS-like animations in
navigation-compose
by default