alexsullivan114
01/10/2020, 7:52 PMAdam Powell
01/10/2020, 8:14 PMLayout
composableConstraintLayout
is able to exist on top of italexsullivan114
01/10/2020, 8:30 PMLayout
composable - is that a parent of Column
and Row
and whatnot?Adam Powell
01/10/2020, 9:10 PMLayout
is the low-level composable that lets you give it a children: @Composable () -> Unit
block and provide a measure/layout algorithmlayout(myWidth, myHeight) {
block and place all of the measurables in thereonMeasure
and onLayout
in the same lexical scope; you don't have to use instance fields to keep info between the twomyWidth, myHeight
didn't changeWithConstraints
that lets you compose content based on the layout constraints it receives; something like this is what the Compose RecyclerView-alike is based onRow
and Column
rather than a parameterized LinearLayout
is easier for me to visually parse, personally, but almost everyone we talk to is confused by Stack
meaning FrameLayout
- a part of me just wants to s/Stack/Frame/
for this and call that part a dayRow
and Column
- naming is hard 🙂alexsullivan114
01/10/2020, 9:22 PMRow
and Column
and Stack
- I also didn't originally parse Stack
as being the same as FrameLayout
but I think that's just lingering android view terminology that should probably be avoided. I think conceptually Stack
makes sense.
My question has more to do with like, FlexColumn
vs Column
vs Container
vs etc. Basically there's a lot of layout "primitives" out there in compose, whereas on the RN side you have one (View
) and in native android you have ~ 3-5 or so core view groups.
Honestly it could just be that I'm still internalizing the main layout composables and there's not as many as I'm imagining.Adam Powell
01/10/2020, 11:35 PMColumn
is meant to be able to do all of what FlexColumn
was doing by way of using modifiers on Column
children rather than the DSL scope of FlexColumn
to declare the same things.