https://kotlinlang.org logo
#compose
Title
# compose
m

myanmarking

06/02/2022, 5:27 PM
is there any padding equivalent, optimised with graphics layer =?
a

Adam Powell

06/02/2022, 5:28 PM
I don't understand the question. What problem are you looking to solve?
m

myanmarking

06/02/2022, 5:31 PM
padding changing according to scrollState. I can use padding just fine. But when i do this kinda of animations, always try to find out if there is any equivalent with graphics layer, that only changes the draw and not the measure
i always overthink with compose 😛 thinking about it, padding affects measure, so it most certainly cannot do this
a

Adam Powell

06/02/2022, 5:34 PM
are you attempting to avoid recomposition for dynamic padding changes at layout time?
m

myanmarking

06/02/2022, 5:35 PM
imagine a Column with a card with horizontal padding, that is sticky and loses padding when on top. that kind of animation
a

Adam Powell

06/02/2022, 5:36 PM
Modifier.layout {}
is probably what you want if you want to get fancy here
m

myanmarking

06/02/2022, 5:36 PM
gonna give it a try. thanks
👍 1
2 Views