Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Holo progressbar glow effect

Tags:

android

canvas

I'm using canvas to draw my custom shape, and I want to add glow effect on it's end like in Android Progressbar View. I tried to look at Android sources, but did not found how exactly such effect is achieved.

Desireble effect

like image 273
Yury Solovyov Avatar asked Aug 26 '26 07:08

Yury Solovyov


2 Answers

The glow effect is part of the PNG image, see its source file. It is used (indirectly via drawable/progress_horizontal_holo_light) as value of android:progressDrawable.

like image 161
devconsole Avatar answered Aug 28 '26 21:08

devconsole


You can achieve the glowing by using a BlurMaskFilter which can be used via paint.setFilterMask(maskFilter).

You might need to make multiple draws with different filters to achieve some cool effects.

like image 35
WarrenFaith Avatar answered Aug 28 '26 21:08

WarrenFaith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!