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

tylerwilson

10/22/2021, 1:50 PM
Working on a Compose layout, and using Box. But I need to align with the screen size, so I tried BoxWithContraint. But when I use that, it appears to be in a constant update loop (Box does not do this), which kills performance. Any tips on how to perhaps speed this up, or get the screen width for the plain old Box?
c

Csaba Kozák

10/22/2021, 1:56 PM
Can you share some code? It should not do it by default.
t

tylerwilson

10/22/2021, 1:58 PM
It is quite a large compose tree. I will try to start a new sample and build it up until I see the issue.
c

Csaba Kozák

10/22/2021, 2:00 PM
Okay. The problem could be that something reacts to the constraint of the box (as expected), but in turn it updates the layout containing the box, hence the infinite loop.