I have a CardView
within a ConstraintLayout
.
This view is then inflated and added to a LinearLayout
.
I would like the CardView
to cast a shadow on the next CardView
, but it seems to be clipped by the ConstraintLayout
. How can I get the elevation
shadow to show on the CardView
without providing more padding or margins for it?
i.e. How can I cast the shadow on an adjacent item?
<LinearLayout>
<ConstraintLayout>
<CardView> <-- This view's shadow is cut
...
</CardView>
</ConstraintLayout>
<ConstraintLayout>
<CardView>
...
</CardView>
</ConstraintLayout>
<LinearLayout>
Try adding this comment inside your card view that's enough
card_view:cardUseCompatPadding="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With