I want to create this layout
this is a cardview (gray view) and imageview(blue view) for that i use this code
You can wrap CardView in FrameLayout but then the shadow will be cropped. Set android:clipChildren="false" to fix it