News for hackers. Stuff that matters.
Re:Flexbox-layout: Flexbox for Android by tn13 on Friday May 06, 2016 @04:37PM (#11646567)
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.

Re:Flexbox-layout: Flexbox for Android by sratner on Friday May 06, 2016 @05:22PM (#11646801)
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.

Re:Flexbox-layout: Flexbox for Android by myko on Friday May 06, 2016 @09:01PM (#11647823)
Is this distinction documented somewhere?
Re:Flexbox-layout: Flexbox for Android by sratner on Friday May 06, 2016 @10:59PM (#11648186)
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...

Re:Flexbox-layout: Flexbox for Android by veeti on Friday May 06, 2016 @05:09PM (#11646744)
The XML attribute naming in Android general is all over the place. A mix of camel and snake case.