{"id":13396301,"url":"https://github.com/castorflex/SmoothProgressBar","last_synced_at":"2025-03-13T22:32:04.825Z","repository":{"id":12162320,"uuid":"14758329","full_name":"castorflex/SmoothProgressBar","owner":"castorflex","description":"A small Android library allowing you to have a smooth and customizable horizontal or circular indeterminate ProgressBar","archived":false,"fork":false,"pushed_at":"2021-05-21T18:02:35.000Z","size":15681,"stargazers_count":4506,"open_issues_count":14,"forks_count":1007,"subscribers_count":192,"default_branch":"master","last_synced_at":"2024-07-31T18:17:03.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/castorflex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-27T20:32:16.000Z","updated_at":"2024-07-25T16:51:47.000Z","dependencies_parsed_at":"2022-08-07T06:16:46.031Z","dependency_job_id":null,"html_url":"https://github.com/castorflex/SmoothProgressBar","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castorflex%2FSmoothProgressBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castorflex%2FSmoothProgressBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castorflex%2FSmoothProgressBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/castorflex%2FSmoothProgressBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/castorflex","download_url":"https://codeload.github.com/castorflex/SmoothProgressBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243494242,"owners_count":20299786,"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-07-30T18:00:44.286Z","updated_at":"2025-03-13T22:32:04.112Z","avatar_url":"https://github.com/castorflex.png","language":"Java","readme":"## Description\n\nSmall library allowing you to make a smooth indeterminate progress bar. You can either user your progress bars and set this drawable or use directly the `SmoothProgressBarView`.\n\n## Demo:\nSample app available on the [Play Store]\n\n![SmoothProgressBar](screenshots/SPB_sample.gif)    \n\n## How does it work\n\nI wrote a [blog post] about that.\n\n## Integration     \n\n**SmoothProgressBar** (min API 7): [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.castorflex.smoothprogressbar/library/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.github.castorflex.smoothprogressbar/library)\n\n**CircularProgressBar** (min API 14): [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.castorflex.smoothprogressbar/library-circular/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.github.castorflex.smoothprogressbar/library-circular)\n\nThe lib is now on Maven Central. All you have to do is add it on your gradle build:\n\n```groovy\ndependencies {\n    // of course, do not write x.x.x but the version number\n    implementation 'com.github.castorflex.smoothprogressbar:library:x.x.x'\n    // or\n    implementation 'com.github.castorflex.smoothprogressbar:library-circular:x.x.x'\n}\n```\nYou can find the last stable version on [Gradle Please]\n\n\nOr you can try the latest snapshots: ![](https://img.shields.io/nexus/s/com.github.castorflex.smoothprogressbar/library?label=smoothprogressbar\u0026server=https%3A%2F%2Foss.sonatype.org) ![](https://img.shields.io/nexus/s/com.github.castorflex.smoothprogressbar/library-circular?label=circular\u0026server=https%3A%2F%2Foss.sonatype.org)\n\n```groovy\nrepositories {\n    maven { url \"https://oss.sonatype.org/content/repositories/snapshots/\" }\n}\n\ndependencies {\n    implementation 'com.github.castorflex.smoothprogressbar:library:1.4.0-SNAPSHOT'\n    implementation 'com.github.castorflex.smoothprogressbar:library-circular:1.4.0-SNAPSHOT'\n}\n```\n\n\nIf you really want (or have) to use Eclipse, please look at the forks.\n\n## Usage\n\n-\tUse directly SmoothProgressBar:\n\n```xml\n\u003cfr.castorflex.android.smoothprogressbar.SmoothProgressBar\n\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\txmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:indeterminate=\"true\"\n    app:spb_sections_count=\"4\"\n    app:spb_color=\"#FF0000\"\n    app:spb_speed=\"2.0\"\n    app:spb_stroke_width=\"4dp\"\n    app:spb_stroke_separator_length=\"4dp\"\n    app:spb_reversed=\"false\"\n    app:spb_mirror_mode=\"false\"\n    app:spb_progressiveStart_activated=\"true\"\n    app:spb_progressiveStart_speed=\"1.5\"\n    app:spb_progressiveStop_speed=\"3.4\"\n    /\u003e\n\n\u003cfr.castorflex.android.circularprogressbar.CircularProgressBar\n\txmlns:android=\"http://schemas.android.com/apk/res/android\"\n\txmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:indeterminate=\"true\"\n    app:cpb_color=\"#FFee44\"\n    app:cpb_colors=\"@array/mycolors\"\n    app:cpb_rotation_speed=\"1.0\"\n    app:cpb_sweep_speed=\"1.0\"\n    app:cpb_stroke_width=\"4dp\"\n    app:cpb_min_sweep_angle=\"10\"\n    app:cpb_max_sweep_angle=\"300\"\n    /\u003e\n```\n\nOr use styles:\n\n```xml\n\u003cstyle name=\"AppTheme\"\u003e\n    \u003citem name=\"spbStyle\"\u003e@style/GNowProgressBar\u003c/item\u003e\n    \u003citem name=\"cpbStyle\"\u003e@style/CircularThemeProgressBar\u003c/item\u003e\n\u003c/style\u003e\n\n\u003cstyle name=\"GNowProgressBar\" parent=\"SmoothProgressBar\"\u003e\n    \u003citem name=\"spb_stroke_separator_length\"\u003e0dp\u003c/item\u003e\n    \u003citem name=\"spb_sections_count\"\u003e2\u003c/item\u003e\n    \u003citem name=\"spb_speed\"\u003e1.7\u003c/item\u003e\n    \u003citem name=\"spb_progressiveStart_speed\"\u003e2\u003c/item\u003e\n    \u003citem name=\"spb_progressiveStop_speed\"\u003e3.4\u003c/item\u003e\n    \u003citem name=\"spb_interpolator\"\u003espb_interpolator_acceleratedecelerate\u003c/item\u003e\n    \u003citem name=\"spb_mirror_mode\"\u003etrue\u003c/item\u003e\n    \u003citem name=\"spb_reversed\"\u003etrue\u003c/item\u003e\n    \u003citem name=\"spb_colors\"\u003e@array/gplus_colors\u003c/item\u003e\n    \u003citem name=\"spb_progressiveStart_activated\"\u003etrue\u003c/item\u003e\n\u003c/style\u003e\n\n\u003cstyle name=\"CircularThemeProgressBar\" parent=\"android:Widget.Holo.ProgressBar\"\u003e\n        \u003citem name=\"cpb_color\"\u003e@color/cpb_default_color\u003c/item\u003e\n        \u003citem name=\"cpb_stroke_width\"\u003e@dimen/cpb_default_stroke_width\u003c/item\u003e\n        \u003citem name=\"cpb_min_sweep_angle\"\u003e@integer/cpb_default_min_sweep_angle\u003c/item\u003e\n        \u003citem name=\"cpb_max_sweep_angle\"\u003e@integer/cpb_default_max_sweep_angle\u003c/item\u003e\n        \u003citem name=\"cpb_sweep_speed\"\u003e@string/cpb_default_sweep_speed\u003c/item\u003e\n        \u003citem name=\"cpb_rotation_speed\"\u003e@string/cpb_default_rotation_speed\u003c/item\u003e\n\u003c/style\u003e\n```\n\n*You can find more styles [in the sample app][Sample Themes]*\n\n-   Or instantiate a `SmoothProgressDrawable`/`CircularProgressDrawable` and set it to your ProgressBar\n\n```java\nmProgressBar.setIndeterminateDrawable(new SmoothProgressDrawable.Builder(context)\n    .color(0xff0000)\n    .interpolator(new DecelerateInterpolator())\n    .sectionsCount(4)\n    .separatorLength(8)         //You should use Resources#getDimensionPixelSize\n    .strokeWidth(8f)            //You should use Resources#getDimension\n    .speed(2f)                 //2 times faster\n    .progressiveStartSpeed(2)\n    .progressiveStopSpeed(3.4f)\n    .reversed(false)\n    .mirrorMode(false)\n    .progressiveStart(true)\n    .progressiveStopEndedListener(mListener) //called when the stop animation is over\n    .build());\n    \nmProgressBar.setIndeterminateDrawable(new CircularProgressDrawable\n    .Builder(this)\n    .colors(getResources().getIntArray(R.array.gplus_colors))\n    .sweepSpeed(1f)\n    .strokeWidth(mStrokeWidth)\n    .style(CircularProgressDrawable.Style.ROUNDED)\n    [ ... ]\n    .build();\n```\n\nYou can also set many colors for one bar (see G+ app)\n\n-   via xml (use the `app:spb_colors` attribute with a `integer-array` reference for that)\n\n-   programmatically (use `SmoothProgressDrawable.Builder#colors(int[])` method).\n\n\n## License\n\n```\nCopyright 2014 Antoine Merle\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n#### Badges\n\nCI master: ![](https://github.com/castorflex/smoothprogressbar/actions/workflows/build.yml/badge.svg?branch=master)\n\nCI dev: ![](https://github.com/castorflex/smoothprogressbar/actions/workflows/build.yml/badge.svg?branch=dev)\n\n\n[blog post]: http://antoine-merle.com/blog/2013/11/12/make-your-progressbar-more-smooth/\n\n[Play Store]: https://play.google.com/store/apps/details?id=fr.castorflex.android.smoothprogressbar.sample\n\n[Gradle Please]: http://gradleplease.appspot.com/#smoothprogressbar\n\n[Sample Themes]: https://github.com/castorflex/SmoothProgressBar/blob/master/sample/src/main/res/values/styles.xml\n","funding_links":[],"categories":["Index `(light-weight pages)`","Index","Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastorflex%2FSmoothProgressBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcastorflex%2FSmoothProgressBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcastorflex%2FSmoothProgressBar/lists"}