Skip to content

trdevendran/queued-progressbar

Repository files navigation

QueuedProgressBar

QueuedProgressBar is a progress bar for android. It displays animated running balls as algorithm of Queue(first in first out).

  • Drawn completely using android canvas

Demo

Integration

Integrating QueuedProgressBar in your project is quite easy.

Step 1:

Add this dependency in your project's build.gradle file which is in your app folder

compile 'com.github.trdevendran:queued-progressbar:1.0.0'

add this to your dependencies.

Step 2:

Now place the QueuedProgressBar in your layout.

<com.printfthoughts.queuedprogressbar.QueuedProgressBar
            android:id="@+id/test_queued_progressbar"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            app:ballColor="@color/red"
            app:ballCount="7"
            app:interval="5"
            app:ballRadius="4" />

Step 3:

Initialize your view

QueuedProgressBar queuedProgressbar = (QueuedProgressBar) findViewById(R.id.queued_progressbar);
Params Description
app:ballColor To set the color of the ball's color.
app:ballCount To set the total no of balls.
app:interval To set the interval speed of running animation
app:ballRadius To set the radius value of the ball.

Or, you can change colors on runtime also

queuedProgressbar.setBallColor(int color);
queuedProgressbar.setTotalBalls(int ballCount);
queuedProgressbar.setBallRadius(int radius);
queuedProgressbar.setIntervalValue(int interval);

All colors should have be provided as color int.

Example

queuedProgressbar.setBallColor(Color.RED);
queuedProgressbar.setBallColor(Color.parseColor("#303F9F"));
queuedProgressbar.setBallColor(ContextCompat.getColor(context, R.color.your_color));

Default properties

Ball properties will be applied by default for colorAccent as ballColor, 3 as interval, 5 as ballCount and 5 as ballRadius

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages