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

rkeazor

07/19/2019, 12:42 AM
So will jetpack compose, support constraint layouts.
l

Leland Richardson [G]

07/19/2019, 12:44 AM
the short answer is “yes, but we haven’t decided on exactly what the API of it will look like yet”
3
r

rkeazor

07/19/2019, 12:06 PM
Very nice. So is the plan , this the new style of coding in android? Will this one day replace the current framework?
k

kioba

07/19/2019, 1:28 PM
just out of curiosity, is there a benefit to create and maintain a constraint layout? I love constraint and I see people requesting it but nobody really tells why
l

Leland Richardson [G]

07/19/2019, 5:14 PM
constraint layout is widely used and something people understand, so if we think it can fit in the compose world, i think we feel it makes sense to provide it. it is true though that constraint-based layout systems are harder to represent in this programming model. we have some interesting ideas though that I’m still wrapping my head around that I think could be pretty nice
either way, constraint layout qualifies as an important enough API that we will need to provide some continuity
t

themishkun

07/20/2019, 9:49 AM
@Leland Richardson [G] Why to spend effort on supporting something that (in my experience) is not composable by nature? I mean, we can sure have these some day, but It sounds like supporting constraint is treated like a blocker for the Compose. In my experience, when working with declarative UI's, there's nothing easier than plain row/column with some wrapping. This can be done pretty efficiently with the compose, so major selling point of constraint is diminished.
r

rkeazor

07/20/2019, 11:54 AM
@themishkun I would actually disagree with you. I think having constraint layout support would be a huge benefit. First, in my humble opinion, using constraints is one of the fastest way to build UI. Second, google is also making futher advancements with constraint layouts, such as motion layout. Which makes things like animation as seamless as can be
I have use frameworks like flutter and react native, Which have many cool widgets/components. But there are also hundreds of them lol. If google can simplify this experience with constraint layouts, why not. Thats something Apple is not even doing with SwiftUi and there Auto Layout
t

themishkun

07/20/2019, 1:15 PM
Maybe I was a bit harsh with expesing my thoughts about the subject. I am really not against constraint layout - It is a viable alternative to simple row/column structure. But I doubt that it deserves any effort when Compose has so much work to be done. Constraint Layout needs so much tooling and infrastructure to operate. Also it forces the flat layout structure, which is hard to decompose in any way. In my eyes It shouldn't be the #1 nor #10 priority and devs should not waste their time bothering about constraint be available from the day one.
r

rkeazor

07/20/2019, 4:23 PM
@themishkun The reason you might feel that way is because your underestimating the actual complexity of the feature. Its not something you can just slap on at anytime. A feature like that may lead them to reconsider the overall architecture of jetpack compose, as well as tooling. Its more efficient if they take it into consideration now, than later
Overall Jetpack Compose, from what I can see is a long term project. It will not be ready for production, or probably next year either. It's better to get things right than fast
a

alexsullivan114

07/21/2019, 12:11 AM
I love constraint layout when writing imperative UI but I genuinely do not believe that it fits in with a composable UI paradigm. You need everything up front to define the constraints; that's anathema to the rest of the composable nature that compose is going for.
5
ConstraintLayout is a fantastic tool for writing UI in a non reactive way. But I don't think it fits into a reactive UI paradigm. That doesn't mean it's a bad tool; just that it's perpendicular to the goals of the new framework
7 Views