is it possible to change the shadow color produced by the xml elevation property? I want the shadow be dynamically changed by code.
Starting API 28 (Pie) View#setOutlineAmbientShadowColor(int color) and View#setOutlineSpotShadowColor(int color) are available in the View class.
If you use elevation on your View, you can use both methods to change the color of the shadow.