android-square-progressbar v.1.4.0

android-square-progressbar v.1.4.0

Finally a new major version of the square-progressbar library is out today. This includes some new style options that I implemented from the feedback I got from you. Also there are some UI improvements for the example-application and some changes in the GitHub repository. You can find the updated app in the play store.

GitHub

I cleaned up the whole repository (not as usual just code and images). So I wrote some pages in the wiki which include some examples and a usage-guide with all the available style-options. For each release there will be now a much more detailed changelog and there is a page about how you can contribute to the library as well here. Just take a look around: https://github.com/mrwonderman/android-square-progressbar

Changes

I try to show you the newest features and changes of the library and the example-application now.

Library

Thanks to a pull-request it’s now possible to set the ScaleType of the image. This is very important if you’re working with bigger images which don’t get displayed correctly. You can use the following line of code to set the ScaleType:

squareProgressBar.setImageScaleType(ScaleType.CENTER);

Another thing is the possibility to let the progressbar disappear when the progress hits 100%. By default this is switched off, but you can turn this on like shown here:

squareProgressBar.setClearOnHundred(true);

I extended the PercentStyle object with two new attributes. One lets you define another text that gets used instead of the default “%”-sign. The other one lets you set a different textcolor to the progresstext.

 squareProgressBar.showProgress(true);
 PercentStyle percentStyle = new PercentStyle(Align.CENTER, 280, true);
 percentStyle.setCustomText("#");
 percentStyle.setTextColor(Color.parseColor("#22A362"));
 squareProgressBar.setPercentStyle(percentStyle);

example_percentstyle

Example-application

I enhanced the user-interface a bit and added a RGB chooser. With this dialog you can set the color of the progressbar to a custom color. You can find this new dialog in the navigation drawer right above the “Style” title.

example_grayscaleTwo new style options made it into the app too. One is the grayscale option, which displays the image in different grays. The second one is the “clear at 100%”, which removes the progressbar when the progress hits 100%.

Last but not least, there is a new image that you can choose.

 

Yannick Signer