I would like to set the TransformOrigin of a scaleIn transition to the position of the button clicked to execute the naviation.
I am using ComposeDestinations by raamcosta
@OptIn(ExperimentalAnimationApi::class)
object DetailTransitions : DestinationStyle.Animated {
override fun AnimatedContentScope<NavBackStackEntry>.enterTransition(): EnterTransition? {
return when (initialState.appDestination()) {
GridViewDestination -> scaleIn(
animationSpec = tween(500),
transformOrigin = TransformOrigin(0f,0f)
)
else -> null
}
}
}
@Composable
@Destination(style = DetailTransitions::class)
fun DetailView(app: App) {
...
}