I am working on grid layout using recyclerview in android. The grid occupies a portion of the screen and has a shadow. To get the desired shadow effect I am using an elevati
I found the answer after a little bit of searching from here. The problem was the transparent background. Elevation works with only non-transparent backgrounds on views. To fix it we should set android:outlineProvider="bounds"
on the view and android:clipToPadding="false"
on the view's parent.
Hope it helps someone.