• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Cardview has weird shadow

Hello all.

I started new project and implemented cardview.

My problem is that cardview has this weird shadow and that shadow is cut off also.Im not using cardview the first time and this happened to me the first time.

I tried to search for solution on internet but without luck.

Picture:
quN4iec.png







Code:
rOm98mL.png
 
From that, I'm assuming that a card view defaults to a certain "elevation" over the surface that automatically produces drop shadows?
That is correct. If memory serves me, the default elevation is 4dp. On earlier versions of the support library you actually had to set the elevation for old android versions as follows...

XML:
card_view:cardElevation="4dp"
 
Back
Top Bottom