Rather surprised that I haven't been able to found detailed information about Android's box model. I mean how padding, margins, gravities, etc. they all interact together.
Other than this note about margin and padding in the dev site and this SO question there's not much information out there.
What I'm looking for:
Is it really that simple that is not worth a deeper explanation in the docs?
Thanks,
Juan
Rather surprised that I haven't been able to found detailed information about Android's box model.
Note that little in your question has anything to do with LinearLayout
, the Android equivalent of the "box model" found in XUL or Flex. Perhaps you have a different definition of "box model" than I use.
What are the defaults for margins, paddings, gravities, etc.
0 pixels for the default margin and padding. Default gravity varies by widget/container.
Can manufacturers alter those defaults.
Technically, yes, though I am not aware of this being done in practice.
How are conflicts resolved, specially between a component and its children.
There are no possible conflicts in margin, padding, or gravity.
Any difference between Android versions?
Not that I am aware of.
Is it really that simple that is not worth a deeper explanation in the docs?
IMHO, yes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With