我试图为我的卡片设置一个cardCornerRadius
,但它没有起作用。
请看下面的代码:
CardView 是最后一个属性 cardCornerRadius
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/user_card_view"
android:layout_width="match_parent"
android:layout_height="@dimen/card_height"
android:layout_gravity="center"
android:layout_marginBottom="@dimen/md_keylines"
android:layout_marginLeft="@dimen/md_keylines"
android:layout_marginRight="@dimen/md_keylines"
android:foreground="?attr/selectableItemBackground"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:cardCornerRadius="3dp">
依赖项
编译 'com.android.support:appcompat-v7:23.3.0' 编译 'com.android.support:design:23.3.0' 编译 'com.android.support:cardview-v7:23.3.0'
控制台没有显示任何错误信息,所以我真的不知道发生了什么。
你有什么好的想法吗?
谢谢!