{"id":21130117,"url":"https://github.com/tasomaniac/DelayedProgress","last_synced_at":"2025-07-09T01:32:25.791Z","repository":{"id":57726638,"uuid":"18669153","full_name":"tasomaniac/DelayedProgress","owner":"tasomaniac","description":"ProgressDialog that waits a minimum time to be dismissed before showing. Once visible, the ProgressDialog will be visible for a minimum amount of time to avoid \"flashes\" in the UI.","archived":false,"fork":false,"pushed_at":"2022-09-07T15:30:16.000Z","size":264,"stargazers_count":97,"open_issues_count":2,"forks_count":21,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-12T21:08:22.596Z","etag":null,"topics":["android","android-library","java","prevents-flashes","progress","progress-bar","progressbar","progressdialog"],"latest_commit_sha":null,"homepage":null,"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/tasomaniac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-11T09:27:18.000Z","updated_at":"2023-08-07T21:13:22.000Z","dependencies_parsed_at":"2022-09-26T21:51:26.048Z","dependency_job_id":null,"html_url":"https://github.com/tasomaniac/DelayedProgress","commit_stats":null,"previous_names":["metrekare/contentloadingprogressdialog","tasomaniac/contentloadingprogressdialog"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FDelayedProgress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FDelayedProgress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FDelayedProgress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FDelayedProgress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tasomaniac","download_url":"https://codeload.github.com/tasomaniac/DelayedProgress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476373,"owners_count":17480215,"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","android-library","java","prevents-flashes","progress","progress-bar","progressbar","progressdialog"],"created_at":"2024-11-20T05:32:17.556Z","updated_at":"2024-11-20T05:32:25.192Z","avatar_url":"https://github.com/tasomaniac.png","language":"Java","readme":"DelayedProgress\n============================\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-DelayedProgress-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2117)\n[![Build Status](https://travis-ci.org/tasomaniac/DelayedProgress.png?branch=master)](https://travis-ci.org/tasomaniac/DelayedProgress)\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n\nProgressBar and ProgressDialog that waits a minimum time to be dismissed before showing.\nOnce visible, the they will be visible for a minimum amount of time to avoid \"flashes\" in the UI.\n\nThey extend platform version of them so that you can just replace all of your ProgressBar and ProgressDialog implementations quickly.\n\nHow does it look like?\n----------------------\n\nHere is a demonstration of the usage in [GDG Android App](https://github.com/gdg-x/frisbee/).\nAs you can see here, on orientation change, the data is loaded quickly and has no progress indicator.\n\n![](https://cloud.githubusercontent.com/assets/763339/11843080/39e52c96-a410-11e5-81ea-f8c0ec623283.gif)\n\nUsage\n-----\n\nDelayedProgressBar\n------------------\n\n`DelayedProgressBar` is an extension to `ProgressBar` that handles automatic delaying and prevents flashes in the UI.\n\nYou can create it programatically just like you do with `ProgressBar` or you can use it in your XMLs.\n\n    \u003ccom.tasomaniac.android.widget.DelayedProgressBar\n        android:id=\"@android:id/progress\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        style=\"?android:progressBarStyleHorizontal\"/\u003e\n\nAnd you have to use `show()` and `hide()` functions instead of setting its visibility manually to have awesome delaying functionality.\n\nAdditionally we have `show(boolean animate)` and `hide(boolean animate)` that fades in and out the `ProgressBar`.\n\n    progressbar.show(true);\n\nLastly, if you want to do something when the animation ends, you can use the below function with endAction.\n\n    progressbar.show(true, new Runnable() {\n        @Override\n        public void run() {\n            //Do something\n        }\n    });\n\n    progressbar.hide(true, new Runnable() {\n        @Override\n        public void run() {\n            //Do something\n        }\n    });\n\nDelayedProgressDialog\n---------------------\n\n`DelayedProgressDialog` is an extension to `ProgressDialog` that handles automatic delaying and prevents flashes in the UI.\nYou can use it just like `ProgressDialog`. Just use `show()` and `dismiss()` appropriately and it will handle the rest.\n\nTo create a `DelayedProgressDialog` with default timing values\n\n    DelayedProgressDialog.showDelayed(context, title, message, indeterminate, cancelable);\n    \nYou can use `make()` to just create (without calling `show()`) it manually. This way you can modify it easily before calling `show()`\n\n    DelayedProgressDialog.makeDelayed(context, title, message, indeterminate, cancelable);\n    \nAnd configure\n\n    DelayedProgressDialog dialog = DelayedProgressDialog.make(...);\n    dialog.setMinDelay(2000);\n    dialog.setMinShowTime(500);\n    dialog.show();\n\nDownload\n--------\n\n```groovy\ncompile 'com.tasomaniac:delayed-progress:0.4'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository][snap].\n\nLicense\n-------\n\n    Copyright (C) 2015 Said Tahsin Dane\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n\n\n [snap]: https://oss.sonatype.org/content/repositories/snapshots/\n","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasomaniac%2FDelayedProgress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftasomaniac%2FDelayedProgress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasomaniac%2FDelayedProgress/lists"}