Changing CardView shadow color

Consider this thread in twitter, where Nick Butcher talks about how to implement the feature:

enter image description here

See outlineAmbientShadowColor, outlineSpotShadowColor, spotShadowAlpha and ambientShadowAlpha attributes for details. Unfortunately, that’s possible from API 28 onwards.

For lower APIs Nick has shared a gist. Here’s the result:

Running on API 21

This technique isn’t directly connected to CardView, it can be applied to any View.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)