My CardView shadows faded on Lollipop devices after applying Proguard. I did not define any rules for protecting this library because I did not read it at all.
I am putting you a couple of screenshots, first without starting proguard and secon after starting.
Screenshot without proguard
Screenshot with proguard
And this is my xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity"> <android.support.v7.widget.CardView android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_margin="4dp" app:contentPadding="10dp" app:cardUseCompatPadding="true"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Text 1"/> </android.support.v7.widget.CardView> <android.support.v7.widget.CardView android:layout_height="wrap_content" android:layout_width="match_parent" android:layout_margin="4dp" app:contentPadding="10dp" app:cardUseCompatPadding="false"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Text 2"/> </android.support.v7.widget.CardView> </LinearLayout>
Activity only sets xml as content and does nothing. As you can see, I use two features of cardUseCompatPadding , but this does not solve the problem as it is defined in this thread .
Does anyone know why proguard breaks my shadows?
source share