Cardview corner(edges) display with dark color,how to resolve this?

Viewed 1929

I use card view for display corner to my auto scroll view pager but cardview corner display with different color please some help me to resolve this issue

<android.support.v7.widget.CardView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
app:cardElevation="0dp"
app:cardCornerRadius="@dimen/_12sdp">

See this image

4 Answers

try attribute in cardview

app:cardBackgroundColor="@android:color/transparent"
app:cardUseCompatPadding="true"

I set this param and it works for me

enter image description here

android:outlineSpotShadowColor="@color/white"

Add this to drawable file...

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item>
        <shape>
            <solid
                android:color="@color/grey_light">  // here you can change color to white
            </solid>
            <corners android:radius="@dimen/dimen10"
                />
        </shape>
    </item>
</selector>

and then use this as background for any layout

I don't know why but apply transparent background color to your inner views works. If you have exoplayer view, apply it to shutter_background_color.

Related