I'm trying to set to my cards a cardCornerRadius
but its not working.
Take a look my code below:
CardView where the last property is the 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">
Dependencies
compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.android.support:cardview-v7:23.3.0'
I didn't get any error in the console, so I really don't know what is happening.
Any idea how to do it?
Thanks!
I think you may be usingsetBackgroundColor
in your code.
If so, try to use setCardBackgroundColor
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With