{"id":13428751,"url":"https://github.com/razir/ProgressButton","last_synced_at":"2025-03-16T01:33:29.482Z","repository":{"id":40633336,"uuid":"182247983","full_name":"razir/ProgressButton","owner":"razir","description":"Android Progress Button","archived":false,"fork":false,"pushed_at":"2021-03-16T19:57:51.000Z","size":1398,"stargazers_count":856,"open_issues_count":9,"forks_count":77,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-27T06:38:59.259Z","etag":null,"topics":["android","button","material-design","progress-bar","progress-button"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/razir.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":"2019-04-19T10:28:06.000Z","updated_at":"2024-09-14T10:11:50.000Z","dependencies_parsed_at":"2022-07-14T04:20:30.904Z","dependency_job_id":null,"html_url":"https://github.com/razir/ProgressButton","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/razir%2FProgressButton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razir%2FProgressButton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razir%2FProgressButton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razir%2FProgressButton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razir","download_url":"https://codeload.github.com/razir/ProgressButton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814905,"owners_count":20352037,"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","button","material-design","progress-bar","progress-button"],"created_at":"2024-07-31T01:01:04.216Z","updated_at":"2025-03-16T01:33:29.106Z","avatar_url":"https://github.com/razir.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":[],"readme":"# Progress Button Android  [ ![Download](https://api.bintray.com/packages/razir/maven/progressbutton/images/download.svg?version=2.1.0) ](https://bintray.com/razir/maven/progressbutton/2.1.0/link)\n\n![basic progress button example](https://raw.githubusercontent.com/razir/ProgressButton/master/gif/progress_default.gif) ![progress cebter button example](https://raw.githubusercontent.com/razir/ProgressButton/master/gif/progress_center.gif)\n![mixed progress button example](https://raw.githubusercontent.com/razir/ProgressButton/master/gif/mixed.gif)  \n\n#### Article on ProAndroidDev.com explaining how it works\nhttps://proandroiddev.com/replace-progressdialog-with-a-progress-button-in-your-app-14ed1d50b44\n\n#### Add progress to any button by few lines of code without layout changes\n\n### Main features: \n  - No layout changes required\n  - Few lines of code to add\n  - Easy configurable\n  - Customizable \n  - Built in fade animations\n\n## Gradle dependency \n```\nallprojects {\n  repositories {\n    mavenCentral()\n  }\n}\n```\n    \n```\nimplementation 'com.github.razir.progressbutton:progressbutton:2.1.0'\n```\n\n## How to use\n\n### Basic example\n\n```kotlin\noverride fun onCreate(savedInstanceState: Bundle?) {\n    super.onCreate(savedInstanceState)\n    setContentView(R.layout.activity_main)\n    // bind your button to activity lifecycle\n    bindProgressButton(myButton)\n\n    // (Optional) Enable fade In / Fade out animations \n    myButton.attachTextChangeAnimator()\n\n    // Show progress with \"Loading\" text\n    myButton.showProgress {\n        buttonTextRes = R.string.loading\n        progressColor = Color.WHITE\n    }\n\n    // Hide progress and show \"Submit\" text instead\n    myButton.hideProgress(R.string.submit)\n}\n```\n\n### Showing AnimatedDrawable\n\n![animated drawable button example](https://raw.githubusercontent.com/razir/ProgressButton/master/gif/animated_drawable.gif)\n\n```kotlin\nval animatedDrawable = ContextCompat.getDrawable(this, R.drawable.animated_check)  \n//Defined bounds are required for your drawable  \nanimatedDrawable.setBounds(0, 0, 40, 40)  \n  \nbutton.showDrawable(animatedDrawable) {  \n  buttonTextRes = R.string.saved  \n}\n```\n\n### Detailed doc: [here](DetailedDoc.md)\n\n### Java samples: [here](app/src/main/java/com/github/razir/progressexample/java)\n\n### Min SDK 14\n\n### Avoiding memory leaks\nTo avoid memory leaks you always need to bind your button to a LifecycleOwner (usually Activity, or Fragment) :\n\n```kotlin\n[LifecycleOwner].bindProgressButton(button)\n```\n\n### License \nApache 2.0\n\n### Author\nAnton Hadutski \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazir%2FProgressButton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazir%2FProgressButton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazir%2FProgressButton/lists"}