<android.support.v7.widget.CardView android:layout_width="100dp" android:layout_height="100dp" cardElevation="5dp" contentPadding="5dp" cardBackgroundColor="#fffefe" cardCornerRadius="12dp" android:layout_marginLeft="14dp" android:layout_marginStart="14dp" android:id="@+id/cardView"> <ImageView android:id="@+id/img" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /></android.support.v7.widget.CardView>
依赖
compile 'com.android.support:cardview-v7:22.2.1'