On pre-Lollipop platforms, CardView does not clip the bounds of the Card for the rounded corners.
Instead, it adds padding to content so that it won't overlap with the rounded corners.
You can disable this behavior by setting this field to false.
在Lollipop之前的平台上,CardView不会为圆角修剪卡片的边界。相反,它会向内容添加填充,以便它不会与圆角重叠。您可以通过将此字段设置为false来禁用此行为。
(Ca 主要适配Lollipop之前的版本)
CardView adds additional padding to draw shadows on platforms before Lollipop.
This may cause Cards to have different sizes between Lollipop and before Lollipop.
If you need to align CardView with other Views, you may need api version specific dimension resources to account for the changes.
As an alternative, you can set this flag to true and CardView will add the same padding values on platforms Lollipop and after.
Since setting this flag to true adds unnecessary gaps in the UI, default value is false.