Programming language: Java
License: Apache License 2.0
Tags: Other Widget    
Latest version: v1.1.1

DotLoader alternatives and similar packages

Based on the "Other Widget" category.
Alternatively, view DotLoader alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of DotLoader or a related project?

Add another 'Other Widget' Package



Release Android Arsenal


First, the gifs!

I am the one with constant Dots:

[Sample Gif](assets/constant_dots.gif?raw=true)

You can add dots on the fly !

[Sample Gif](assets/adding_dots.gif?raw=true)

And maybe create some cool animations like this?

[Sample Gif](assets/loading_anim.gif?raw=true)

(This sucks but you get the idea :))

How to use.

Adding to your project

Currently only gradle supported

Add to your project level build.gradle's allprojects block like this

allprojects {
    repositories {
        maven { url "https://jitpack.io" }

Next add to your module level (app) build.gradle's dependencies block like this

Check the releases section to get the version name for the latest release (i.e the name to replace X.X.X with)

dependencies {
    compile 'com.github.bhargavms:DotLoader:X.X.X'

You're all set, Now you can start using the DotLoader class.

Simple to use!

This works like any other view in android. You use it in your xml file like this


Now I will explain the 3 custom attributes here,


This is the main metric from which all sizes are calculated, if you were to provide wrap_content for layout_width and layout_height. You can, of course, provide your own height, in which case the animation might look horrible. You can also provide greater width than necessary, but the dots will not spread out to take up width (trust me doesn't look good).


By default this is 1 (looks ridiculous I know but hey it is your choice!). So just provide the input here for whatever number of dots you want. (you can have a gazzillion, if you can fit in your phone screen xD)


Ah this is where I made the magic happen! Provide here a reference (like I have in the code above app:color_array="@array/dot_colors") to an array of colors which can be declared like so in your colors.xml file

<array name="dot_colors">

What this does is provide the DotLoader instance with a set colors through which the animation iterates over, looks neat don't you think?

OK Now a TIP!!

If you plan to increase the number of dots on the fly, please remember to call requestLayout() on the view, OR provide enough width before hand, then you don't have to call requestLayout() and make things choppy

Increasing and decreasing the DOTS on the fly! HOW?

Now for this the DotLoader class comes with the setNumberOfDots(int numberOfDots) method. Use this to change the number of dots to whatever you want on the fly and see the magic happen. In the demo app, I demonstrate this by changing the number of dots after a set period using the postDelayed() method from the View class.

dotLoader.postDelayed(new Runnable() {
    public void run() {
}, 3000);
This library is heavily inspired by this design of Blake Manzo

Thats it! QuestionS? ask em in the issues section! Oh aren't I forgetting something? Ah License!


[Apache 2.0](LICENSE)

*Note that all licence references and agreements mentioned in the DotLoader README section above are relevant to that project's source code only.