{"id":13717065,"url":"https://github.com/panwrona/DownloadProgressBar","last_synced_at":"2025-05-07T06:31:54.489Z","repository":{"id":39614143,"uuid":"38199321","full_name":"panwrona/DownloadProgressBar","owner":"panwrona","description":"DownloadProgressBar is an android library that delivers awesome custom progress bar. You can manipulate it's state in every way.","archived":false,"fork":false,"pushed_at":"2015-08-15T10:09:32.000Z","size":887,"stargazers_count":975,"open_issues_count":4,"forks_count":167,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-11-14T05:33:49.679Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panwrona.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-28T13:12:04.000Z","updated_at":"2024-10-24T06:37:48.000Z","dependencies_parsed_at":"2022-09-15T21:40:11.765Z","dependency_job_id":null,"html_url":"https://github.com/panwrona/DownloadProgressBar","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panwrona%2FDownloadProgressBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panwrona%2FDownloadProgressBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panwrona%2FDownloadProgressBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panwrona%2FDownloadProgressBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panwrona","download_url":"https://codeload.github.com/panwrona/DownloadProgressBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252826898,"owners_count":21810200,"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-08-03T00:01:17.542Z","updated_at":"2025-05-07T06:31:53.586Z","avatar_url":"https://github.com/panwrona.png","language":"Java","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"# Download Progress Bar\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DownloadProgressBar-green.svg?style=flat)](https://android-arsenal.com/details/1/2059)\n\nAndroid progress bar with cool animation, inspired by : https://dribbble.com/shots/2012292-Download-Animation\n\n![Download Progress Bar Animation](success.gif)\n---\n![Download Progress Bar Animation](error.gif)\n\n---\n###Attributes\n\n| Attribute                     | Type      | Usage                                                                |\n| ----------------------------- | --------- | -------------------------------------------------------------------- |\n| `app:circleRadius`            | dimension | The dimension of the circle radius                                   |\n| `app:strokeWidth`             | dimension | The dimension of the circle stroke width                             |\n| `app:lineWidth`               | dimension | Color used for the progress completed                                |\n| `app:progressDuration`        | integer   | Duration of progress. Default value is set to 1000 ms                |\n| `app:resultDuration`          | integer   | Duration of result, either success and error. Default set to 4000 ms |\n| `app:overshootValue`          | dimension | Value of overshoot interpolator (used for popping up the circle)     |\n| `app:drawingColor `           | color     | Color used for drawing inside drawables (white on gif)               |\n| `app:progressColor `          | color     | Color used for drawing the progress (white on gif)                   |\n| `app:circleBackgroundColor `  | color     | Color used for drawing background circle (light blue on gif)         |\n| `app:progressBackgroundColor `| color     | Color used for drawing progress background (light blue on gif)       |\n\n---\n\n###Updates\n- v1.1\n    - Added new animation - ManipulateProgressAnimation - now you can set your progress manually. The default result is set to Success. Just play the animation with:\n    ```java\n    downloadProgressBar.playManualProgressAnimation();\n    ```\n    - You can change the result type with:\n    ```java\n    downloadProgressBar.setErrorResultState();\n    ```\n    or\n    ```java\n    downloadProgressBar.setSuccessResultState();\n    ```\n    - To set the progress use setProgress method. The value must be between 1-100 - it determines percent value:\n    ```java\n    downloadProgressBar.setProgress(value);\n    ```\n    - You can abort the progress and set the error result immediately just by typing:\n    ```java\n    downloadProgressBar.abortDownload();\n    ```\n    - Also I've added two methods to the callback - onManualProgressStarted() and onManualProgressEnded(). They're called everytime the setProgress() method ends.\n\n###Download\n\n```groovy\nrepositories {\n    maven {\n        url \"https://jitpack.io\"\n    }\n}\n\ndependencies {\n    compile 'com.github.panwrona:DownloadProgressBar:1.1'\n}\n```\n\n###Usage\n\nBelow I will show You how to use this custom view. First we need to distinguish two kinds of result we can get: success and error.\nTo play success animation, simply call this one line:\n```java\nDownloadProgressBar downloadProgressBar = (DownloadProgressBar)findViewById(R.id.download_progress_view);\ndownloadProgressBar.playToSuccess();\n```\nIf you want to play error animation, simply call:\n```java\nDownloadProgressBar downloadProgressBar = (DownloadProgressBar)findViewById(R.id.download_progress_view);\ndownloadProgressBar.playToError();\n```\nI've also added listener for common events: whole animation start, whole animation end, progress update, animation success, animation error.\nTo define it, call this one:\n```java\ndownloadProgressBar.setOnProgressUpdateListener(new DownloadProgressBar.OnProgressUpdateListener() {\n            @Override\n            public void onProgressUpdate(float currentPlayTime) {\n                // Here we are setting % value on our text view.\n                successTextView.setText(Math.round(currentPlayTime / 3.6) + \" %\");\n            }\n\n            @Override\n            public void onAnimationStarted() {\n                // Here we are disabling our view because of possible interactions while animating.\n                downloadProgressBar.setEnabled(false);\n            }\n\n            @Override\n            public void onAnimationEnded() {\n                successTextView.setText(\"Click to download\");\n                downloadProgressBar.setEnabled(true);\n            }\n\n            @Override\n            public void onAnimationSuccess() {\n                successTextView.setText(\"Downloaded!\");\n            }\n\n            @Override\n            public void onAnimationError() {\n\n            }\n        });\n```\n###Developed By\n- Mariusz Brona - \u003cmariusz.brona@gmail.com\u003e\n\n\u003ca href=\"https://twitter.com/pan_wrona\"\u003e\n  \u003cimg alt=\"Follow me on Twitter\" src=\"http://imageshack.us/a/img812/3923/smallth.png\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://pl.linkedin.com/in/mariuszbrona\"\u003e\n  \u003cimg alt=\"Add me to Linkedin\" src=\"http://imageshack.us/a/img41/7877/smallld.png\" /\u003e\n\u003c/a\u003e\n\n###License\n\n```\nCopyright 2015 Mariusz Brona\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanwrona%2FDownloadProgressBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanwrona%2FDownloadProgressBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanwrona%2FDownloadProgressBar/lists"}