I finally finished my first android library this night. The idea behind the android-square-progressbar library is that you can display a ProgressBar which surrounds a picture. This could be helpful if you don’t have space for a normal ProgressBar or so.
You can find my github project here, this includes the actual library and an example app: https://github.com/mrwonderman/android-square-progressbar
You can download the library here: http://pub.signer.pro/android-square-progressbar-1.0.1.jar
And the example app here: http://pub.signer.pro/android-square-progressbar-example-1.0.1.apk
At the moment it has the possibility to set different colors. But in the future I see more features like thickness of the ProgressBar and some design things to. The library supports more or less all different shapes of images, as demonstrated in the example app.
Here are some examples how it could look like.
To add this to a project, simply add the following part to your XML-Layout:
<net.yscs.android.square_progressbar.SquareProgressBar android:id="@+id/subi1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/textView1" android:layout_centerHorizontal="true" />
You then can access it from the java code like that:
SquareProgressBar subi = (SquareProgressBar) findViewById(R.id.subi1); subi.setImage(R.drawable.house); subi.setProgress(25);