Android5.0组件CardView的属性解释

CardView是Android5.0提供了一个组件。


<!-- 背景色 -->
android.support.v7.cardview:cardBackgroundColor

Background color for CardView.

Related methods:



  • <!-- 边缘弧度数 -->
  • android.support.v7.cardview:cardCornerRadius

Corner radius for CardView.

Related methods:



  • <!-- 高度 -->
  • android.support.v7.cardview:cardElevation

Elevation for CardView.

Related methods:



  • <!-- 高度 -->
  • android.support.v7.cardview:cardMaxElevation

Maximum Elevation for CardView.

May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

Related methods:

Add padding to CardView on v20 and before to prevent intersections between the Card content and rounded corners.

May be a boolean value, such as "true" or "false".

Related methods:

Add padding in API v21+ as well to have the same measurements with previous versions.

Related methods:

Inner padding between the edges of the Card and children of the CardView.

Related methods:

Inner padding between the bottom edge of the Card and children of the CardView.

Related methods:

Inner padding between the left edge of the Card and children of the CardView.

Related methods:



  • <!-- 卡片右边缘距离内容的距离 -->
  • android.support.v7.cardview:contentPaddingRight

Inner padding between the right edge of the Card and children of the CardView.

Related methods:


<!-- 卡片上边缘距离内容的距离 -->
  • android.support.v7.cardview:contentPaddingTop

Inner padding between the top edge of the Card and children of the CardView.

Related methods:



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值