kofigyan / StateProgressBar

Android library to realize the various states and transitions in a ProgressBar.
1.55k stars 234 forks source link

StateProgressBar is overdrawing #8

Closed connyduck closed 7 years ago

connyduck commented 7 years ago

I noticed StateProgressBar is drawing the foreground color over the background color. This is

  1. visually noticeable on low resolutions - see attached image - top is current version, bottom is how it should look, black background color
  2. bad for performance because drawing the background is not necessary

you can fix it yourself if you want, but I can also send you a pull request^^ Thanks for the cool library, it will soon be used in our 50k users app!

comparison

kofigyan commented 7 years ago

Thank you @connyduck for the positive feedback. I will definitely look into this issue. You are warmly welcome to contribute with a pull request.

connyduck commented 7 years ago

Sent you a pull request! I reduced the number of draw operations quite a bit. Let me know what you think of it.

kofigyan commented 7 years ago

I will look into it quickly and give you a feedback. I really appreciate the contributions.

kofigyan commented 7 years ago

Overdraw is now fixed. Pull request accepted. I had to make some few changes to accommodate feature requests from other users.

connyduck commented 7 years ago

Thank you very much! The change is already live in my app!