Orbital icon indicating copy to clipboard operation
Orbital copied to clipboard

Animation should only apply to specified transition

Open lukasrosenke opened this issue 1 year ago • 0 comments

Given for example I have this component:

val container = rememberContentWithOrbitalScope {
        Box(
            modifier = Modifier
                .animateSharedElementTransition(this,
                    SpringSpec(stiffness = 500f),
                    SpringSpec(stiffness = 500f)
                )
                .fillMaxSize()
                .clip(RoundedCornerShape(16.dp))
                .background(Color.White),
        )
}

If I were to wrap this componnent into Column() the scroll animation for this component would be affected by the specified .animateSharedElementTransition(). In my opinion the animation should only apply when the specified rememberSaveable bool is updated, i.e., for the dynamic transition.

lukasrosenke avatar Jan 02 '24 14:01 lukasrosenke