4 ms·
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 ele
by sratner 10y ago
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 10y agoIs this distinction documented somewhere?
- sratner 10y agoNot very well, but you can start with [1] and explore the LayoutParams hierarchy from there. [1] http://developer.android.com/guide/topics/ui/declaring-layout.html#layout-params http://developer.android.com/guide/topics/ui/declaring-layou...