CardViewIn the support package for Android SDK V7, specifically how to add a project to the V7 package, see the portal here.
android–5.0 Lollipop
Cards are one of the most important components of the new material style design , and the card design is suitable for the presentation of important information, as well as the use of the list as an item containing complex operations.
CardViewInherit Framelayout , more than FrameLayout 3 important attributes,, card_view:cardElevation card_view:cardCornerRadius card_view:cardBackgroundColor .
card_view:cardElevation, you can set the shadow of the card so that CardView there is a visual effect of lifting in the z-axis direction public void setCardElevation (float radius) .
card_view:cardCornerRadius, it is clearly CardView the rounded corners that are set. The method in the corresponding code public void setRadius (float radius) .
card_view:cardBackgroundColor, set CardView the background color , this property will not affect the card_view:cardElevation effect of the shadow. public void setCardBackgroundColor (int color).
<Android.support.v7.widget.CardViewAndroid:id= "@+id/cardview"Android:layout_width= "Fill_parent"Android:layout_height= "Wrap_content"card_view:cardelevation= "100DP"Card_view:cardbackgroundcolor= "@color/grey"Card_view:cardcornerradius= "8DP"Android:layout_marginleft= "@dimen/margin"Android:layout_marginright= "@dimen/margin"> <TextViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_margin= "@dimen/margin"Android:text= "This is CardView" /></Android.support.v7.widget.CardView>
android--CardView Primary Use