1

I am trying to get rid of this gray line on my cardviewenter image description here I am using a color with a bit of transparency - #40B6F2FC here is my code

 <android.support.v7.widget.CardView
        android:id="@+id/cardView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:dividerHeight="0px"
        android:divider="@null"
        app:cardPreventCornerOverlap="false"
        app:cardBackgroundColor="@color/sky_colorBlue_20_percent"
        app:cardCornerRadius="2dp"
        app:cardElevation="2dp"
        app:cardMaxElevation="2dp"
        app:cardUseCompatPadding="true">

Followed the answer of this question https://stackoverflow.com/a/18734605/1599611 but still didnt work.

Is there a way to get rid of this grayline without setting the elevation to zero and using a color with transparency added?

thenewbie
  • 755
  • 19
  • 40

1 Answers1

0

Base from this tracker

https://issuetracker.google.com/issues/37008169

Status: Won't Fix (Intended Behavior) CardView does not support transparency for its background. This is due to limitations of drawing shadows using canvas api.

CodeAndWave
  • 1,586
  • 3
  • 23
  • 33