I am working with cardviews but the problem is my CardView is not showing any elevation or shadow. I have already tried some of the methods suggested in stackoverflow answer
Remove the background color first, add the elevation and later add the background again. Worked for me, though I had added the background through the layout designer.