Another question, why is it that paddings on `Card...
# compose
t
Another question, why is it that paddings on
Card
's are somehow showing as margins? Am I getting it wrong?
a
Modifiers always decorate the outside of an element. Try setting it on the
Column
instead.
1
t
Ah I see.. thank you.
But are there margins then? What would be their usecases since paddings seem to act like margings @Adam Powell
a
Padding can serve both purposes. You can arrange modifiers in any order you choose
Android's margin distinction has always been that margins are LayoutParams, interpreted by the parent ViewGroup and applied according to that parent ViewGroup's implementation
👍 1
Compose's padding increases the size of the element as its parent measures it, making it parent-independent.
👏 1
t
Sounds great. Thanks
👍 1
m
FWIW, this thread covers some more of the thinking behind the padding/margin implementation: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1593799693346200
👍 2
t
Thanks for sharing the thread Mark
👍 1