Currently, I have an app which support Android 2.3 and above.
In my custom view drawing operation, I need to drop shadow while drawing circle.
ballPaint.setShadowLayer(shadowSize, shadowSize, shadowSize, historyChartBallShadow);
canvas.drawCircle(px, py, this.ballSize, ballPaint);
I also understand that, with hardware acceleration turned on, I will not such shadow effect
setShadowLayer Android API differences
However, I realize once hardware acceleration is turned off through view.setLayerType(View.LAYER_TYPE_SOFTWARE, null)
, my entire custom view drawing operation become very slow.
I was wondering, is there any other way to achieve similar shadow effect. (A "blurred" black circle shadow)
without turning off hardware acceleration?
p/s Even when I want to use BlurMaskFilter
from Android draw with blur, I realize it doesn't support hardware acceleration too.