{"id":21948275,"url":"https://github.com/totond/pictureprogressbar","last_synced_at":"2026-03-15T18:12:24.569Z","repository":{"id":109512173,"uuid":"90987248","full_name":"totond/PictureProgressBar","owner":"totond","description":"a ProgressBar with Picture and Animation","archived":false,"fork":false,"pushed_at":"2017-09-18T08:26:17.000Z","size":221,"stargazers_count":106,"open_issues_count":1,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-29T20:22:56.030Z","etag":null,"topics":["android","progressbar"],"latest_commit_sha":null,"homepage":"https://github.com/totond/PictureProgressBar","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/totond.png","metadata":{"files":{"readme":"README-en.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}},"created_at":"2017-05-11T14:15:38.000Z","updated_at":"2023-05-19T08:59:11.000Z","dependencies_parsed_at":"2023-07-28T08:30:45.110Z","dependency_job_id":null,"html_url":"https://github.com/totond/PictureProgressBar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totond%2FPictureProgressBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totond%2FPictureProgressBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totond%2FPictureProgressBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totond%2FPictureProgressBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totond","download_url":"https://codeload.github.com/totond/PictureProgressBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250344637,"owners_count":21415158,"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":["android","progressbar"],"created_at":"2024-11-29T05:12:52.972Z","updated_at":"2025-10-15T22:57:23.639Z","avatar_url":"https://github.com/totond.png","language":"Java","readme":"# PictureProgressBar\n\n## Description\nPictureProgressBar allows you to set picture and animation in the position of current progress.\n\n\n### Demo\n![](http://i.imgur.com/076zTuA.gif)\n\n## Usage\n\n### Gradle\n```\n    compile 'com.yanzhikaijky:PictureProgressbar:1.2.0'\n```\n\n### Attributes\n\n|**Attribute Name**|**Description**|**Type**|**Default**|\n|--|--|:--:|:--:|\n|backGroundColor      | The background color of bar     | color| #888888|\n|barColor            |  The color of bar        | color | #ff0000|\n|drawable             | The drawable of picture| drawable| null|\n|halfDrawableWidth    | The width of drawable     | dimension| 0 |\n|halfDrawableHeight   | The height of drawable      | dimension| 0 |\n|drawableHeightOffset | The height offset of drawable | dimension | 0 |\n|isRound              | Is the angles of bar round   |boolean | true|\n|roundX               | The X direction radius of round angles | dimension| 20px|\n|roundY               | The X direction radius of round angles  | dimension| 20px|\n|progress             |  Initial progress   | int| 0 |\n|max                  |  Max progress   | int| 0 |\n|isSetBar            |   Is the height of bar user-defined |boolean |flase |\n|progressHeight      |   The height of progress bar   | dimension| 100px |\n|progressHeightOffset |  The height offset of progress bar     |  dimension| | 30px |\n|refreshTime          |  The refresh interval   | int | 100|\n|animMode             |  Animation Mode         | eunm| ANIM_NULL|\n|rotateRate           |  The rotation Angle of each interval time         | int| 10 |\n|rotateDegree         |  The initial rotation Angle      | int|  0 |\n|scaleMax             |  The max scale of ScaleAnimation      | float| 1.5f|\n|scaleMin            |   The min scale of ScaleAnimation   |  float| 0.5f|\n|scaleRate            |  The scale of each interval time  | float | 0.1|\n|gradientStartColor   |  The gradient start color  |color | #ff0000 |\n|gradientEndColor     |  The gradient end color   |color | #ffff00|\n|**backgroundDrawable**   |  The background drawable  |reference |  |\n|**barDrawable**     |  The bar drawable  |reference | |\n\n \u003e PS: To set `backgroundDrawable` and `barDrawable` can provide a drawable background like Google's Progress:\n \u003e ![](https://i.imgur.com/laHcRXm.png)\n \u003e ![](https://i.imgur.com/GFgRZCz.gif)\n\n\n**Introduction of animMode：**\n\n|animMode|Description|Usage|\n|--|--|--\n|ANIM_NULL|Without animation|No need for Drawable|\n|ANIM_ROTATE|Rotation animation|Need for Drawable. It is best to set `rotateRate` and `rotateDegree`. The part of Rotation Drawable，which is out of view's scope，will be gone.|\n|ANIM_SCALE |Scale animation|Need for Drawable. It is best to set `scaleMax`、`scaleMin` and `scaleRate`. The part of Scale Drawable，which is out of view's scope，will be gone.| \n|ANIM_ROTATE_SCALE|Rotation and scale animation|Need for Drawable. The part of Scale Drawable，which is out of view's scope，will be gone.|\n|ANIM_FRAME|Frame animation|Need for Drawable，but need for drawableIds array|\n\n\nExcept the setter and getter of above-mentioned attributes, there are some methods: \n\n```\n    //设置动画开关\n    public void setAnimRun(boolean isAnimRun)\n\n    //设置帧动画时要传入的图片ID数组\n    public void setDrawableIds(int[] drawableIds)\n\n    //设置图片\n    public void setPicture(int id)\n\n    //设置颜色渐变器\n    public void setLinearGradient(LinearGradient linearGradient)\n\n    //设置进度监听器\n    public void setOnProgressChangeListener(OnProgressChangeListener onProgressChangeListener)\n\n    //进度监听器\n    public interface OnProgressChangeListener {\n        //进度改变时的回调\n        public void onOnProgressChange(int progress);\n        //进度完成时的回答\n        public void onOnProgressFinish();\n    }\n\n//added by v1.2.0：\n\n    //设置进度条背景图片\n    public void setBarDrawableId(int id) \n\n    //设置进度条图片\n    public void setBarBackgroundDrawableId(int id) \n```\n## LICENSE\n\n```\nCopyright 2017 Yanzhikai\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## Update\n - **version 1.1.1** : 2017/07/07 Fixed a bug：\nAdded Attribute `progressPercentage` to show the percentage of progress.\nChanged the `setProgress()` to prevent the int type overflow:\n\n- **version 1.2.0 **:2017/09/11：\n - Added Attribute, `backgroundDrawable` and `barDrawable`.The new effect is similar to a drawable background in Google's Progress.\n## About\n \u003e id：Yanzhikai\n\n \u003e Email：yanzhikai_yjk@qq.com\n\n \u003e CSDN：http://blog.csdn.net/totond\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotond%2Fpictureprogressbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotond%2Fpictureprogressbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotond%2Fpictureprogressbar/lists"}