Thanks! This was exactly what I needed.
I did notice that “setShadowLayer” is extremely slow. I ended up expanding the rectangle that you draw on canvas, which is a lot faster.
Rect rect = new Rect();