I tried to remove the shadow from the Cardview.
I used android support v7 Cardview on android v4.4.2
My layout look:
Just add below code to cardview tag
app:cardElevation="0dp"
and don't forget to add
xmlns:app="http://schemas.android.com/apk/res-auto"
UPDATE
Also try this put below codes in cardview
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
app:cardCornerRadius="1dp"
app:cardUseCompatPadding="true"
app:cardPreventCornerOverlap="false"
android:background="@null"
The app:cardCornerRadius
should be bigger than 0(>0) otherwise throw exception
I'm using API 28 support library
implementation 'com.android.support:cardview-v7:28.0.0'
I just fixed this problem by using a relative layout instead. Simply change the CardView value to a relative layout and you will essentially get the same result, but without the shadow
You cannot remove the shadow from the cardview in 4.4. Anything below 5.0 elevation does nothing so all the cardview is in 4.4 is an image with a shadow
To create a card with a shadow, use the card_view:cardElevation attribute. CardView uses real elevation and dynamic shadows on Android 5.0 (API level 21) and above and falls back to a programmatic shadow implementation on earlier versions. For more information, see Maintaining Compatibility.
http://developer.android.com/training/material/lists-cards.html#CardView