When animating a Composable with `Modifier.offset`...
# compose
m
When animating a Composable with
Modifier.offset
, the animation isn't smooth but steps pixel-by-pixel, which is very noticeable if the animated movement is slow. Is there a way to animate the movement with smooth non-integer offset values? In other words, can I offset a Composable by half a pixel?
In comparison, animating scale or rotation is very smooth even when rotating/scaling by small values, and states in-between moving by a whole pixel are drawn correctly.
l
Do you use
offset { }
or
offset()
?
m
I'm using
offset { }
l
I think you can try with Modifier.graphicsLayer (translationX/Y). they are float
m
That worked, thank you.
🔥 3