
Flexbox-layout: Flexbox for Android - tilt
https://github.com/google/flexbox-layout
======
tn13
This was much needed. I feel a bit disgusted to look at the attributes naming
though. I dont work a lot with XML but why should an attribute be
"layout_alignSelf"

and not

"layoutAlignSelf" or "layout_align_self" ?

This is a general rant and nothing specific to Flexbox.

~~~
sratner
The "layout_*" attributes are a bit special in that they are specified on an
element, but are provided by the element's container. Rather than affecting
the element and its children, such attributes affect the element's
relationship with its container/siblings. So in this case, the attribute is
"alignSelf", but it is defined and understood by FlexboxLayout rather than the
TextView that specifies it.

Perhaps this isn't the best implementation of such namespacing (maybe they
could've done something more with xmlns?) but I find the visual and semantic
distinction useful when reading and writing layouts.

~~~
myko
Is this distinction documented somewhere?

~~~
sratner
Not very well, but you can start with [1] and explore the LayoutParams
hierarchy from there.

[1] [http://developer.android.com/guide/topics/ui/declaring-
layou...](http://developer.android.com/guide/topics/ui/declaring-
layout.html#layout-params)

------
joe-stanton
Couldn't this have built upon [https://github.com/facebook/css-
layout](https://github.com/facebook/css-layout) ?

------
victornomad
its funny, I was searching for a library doing this a day ago :) I guess this
is going to be mainstream soon, once the windowed mode gets out :)

