As the documentation says, you can add and customize the material design shadow-style by android:elevation
. This works fine with all elements I came across yet.
But what if I want to get the same (or nearly the same) behavior for shapes I draw on a Canvas
? - Currently I'm playing around with Paint.setShadowLayer()
, but the results are far from 'material'-style compared with the native implementation.
Are there any libraries or ways to achieve the same effect? Preferably by adding the elevation level?