Difference between a View's Padding and Margin

后端 未结 14 2889
渐次进展
渐次进展 2020-11-22 06:45

What is the difference between a View\'s Margin and Padding?

14条回答
  •  既然无缘
    2020-11-22 06:52

    Sometimes you can achieve the same result by playing only with padding OR margin. Example :

    Say View X contains view Y (aka : View Y is inside View X).

    -View Y with Margin=30 OR View X with Padding=30 will achieve the same result: View Y will have an offset of 30.

提交回复
热议问题