Hi Team , Is it possible to use ConstraintLayout in Compose Multiplatofrm
maybe 1
j
jw
02/11/2025, 7:01 PM
It should be possible (in theory) to use it on the JVM with Compose UI for Desktop but it will not work for iOS or web.
jw
02/11/2025, 7:02 PM
The constraint solver that sits behind ConstraintLayout is written in Java, so the JVM and Android are the only places it can run.
jw
02/11/2025, 7:03 PM
I'm not aware of anyone that is publishing the Compose-based constraint API against JetBrains' Compose multiplatform artifacts such that it is available in JVM-based Compose UI applications.
s
Skaldebane
02/12/2025, 3:36 AM
Is there anything very Java specific about the solver? Or could it be reimplemented in Kotlin?
Seems like a low-hanging fruit (though Compose makes ConstraintLayout mostly unnecessary, but it still has some useful applications)