{"id":3482,"url":"https://github.com/bhargavms/DotLoader","last_synced_at":"2025-08-03T20:32:29.247Z","repository":{"id":166345168,"uuid":"63788107","full_name":"bhargavms/DotLoader","owner":"bhargavms","description":"A cool customizable loading animation with Dots","archived":false,"fork":false,"pushed_at":"2017-05-29T13:47:51.000Z","size":796,"stargazers_count":137,"open_issues_count":1,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-16T14:34:32.596Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://codepen.io/blakemanzo/pen/OXOBaw","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bhargavms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-07-20T14:27:54.000Z","updated_at":"2024-07-24T17:13:35.000Z","dependencies_parsed_at":"2023-06-09T05:30:32.225Z","dependency_job_id":null,"html_url":"https://github.com/bhargavms/DotLoader","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavms%2FDotLoader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavms%2FDotLoader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavms%2FDotLoader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhargavms%2FDotLoader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhargavms","download_url":"https://codeload.github.com/bhargavms/DotLoader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228567009,"owners_count":17937983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:42.749Z","updated_at":"2024-12-07T05:30:31.686Z","avatar_url":"https://github.com/bhargavms.png","language":"Java","funding_links":[],"categories":["Libraries"],"sub_categories":["GUI"],"readme":"# DotLoader\n[![Release](https://jitpack.io/v/bhargavms/DotLoader.svg)](https://github.com/bhargavms/DotLoader/releases/tag/1.0.0)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DotLoader-green.svg?style=true)](https://android-arsenal.com/details/1/4032)\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n-------------------------------------------------------\n#### First, the gifs!\n##### I am the one with constant Dots:\n![Sample Gif](assets/constant_dots.gif?raw=true)\n\n##### You can add dots on the fly !\n![Sample Gif](assets/adding_dots.gif?raw=true)\n\n##### And maybe create some cool animations like this?\n![Sample Gif](assets/loading_anim.gif?raw=true)\n\n(This sucks but you get the idea :))\n\n#### How to use.\n##### Adding to your project\n\u003e Currently only gradle supported\n\nAdd to your project level `build.gradle`'s `allprojects` block like this\n```\nallprojects {\n    repositories {\n        maven { url \"https://jitpack.io\" }\n    }\n}\n```\nNext add to your module level (app) `build.gradle`'s dependencies block like this\n\u003e Check the [releases](https://github.com/bhargavms/DotLoader/releases) section to get the version name for the latest release (i.e the name to replace X.X.X with)\n\n```\ndependencies {\n    compile 'com.github.bhargavms:DotLoader:X.X.X'\n}\n```\n\nYou're all set, Now you can start using the DotLoader class.\n\n#### Simple to use!\n\nThis works like any other view in android. You use it in your xml file like this\n```xml\n\u003ccom.bhargavms.dotloader.DotLoader\n    android:id=\"@+id/text_dot_loader\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    app:color_array=\"@array/dot_colors\"\n    app:dot_radius=\"4dp\"\n    app:number_of_dots=\"3\"/\u003e\n```\nNow I will explain the 3 custom attributes here,\n\n`dot_radius`\n\nThis 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).\n\n`number_of_dots`\n\nBy 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)\n\n`color_array`\n\nAh 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\n```xml\n\u003carray name=\"dot_colors\"\u003e\n    \u003citem\u003e#03A9F4\u003c/item\u003e\n    \u003citem\u003e#E65100\u003c/item\u003e\n    \u003citem\u003e#FFBB00\u003c/item\u003e\n\u003c/array\u003e\n```\nWhat this does is provide the DotLoader instance with a set colors through which the animation iterates over, looks neat don't you think?\n\n##### OK Now a TIP!!\n\u003e 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\n\n##### Increasing and decreasing the DOTS on the fly! HOW?\nNow 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.\n```java\ndotLoader.postDelayed(new Runnable() {\n    @Override\n    public void run() {\n        dotLoader.setNumberOfDots(5);\n    }\n}, 3000);\n```\n\n##### This library is heavily inspired by [this](http://codepen.io/blakemanzo/pen/OXOBaw) design of Blake Manzo\n--------------------------------------------------------------------------------------\nThats it! QuestionS? ask em in the issues section!\nOh aren't I forgetting something? Ah License!\n\n#### LICENSE\n[Apache 2.0](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhargavms%2FDotLoader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhargavms%2FDotLoader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhargavms%2FDotLoader/lists"}