{"id":13640344,"url":"https://github.com/vlonjat-gashi/progress-activity","last_synced_at":"2025-04-12T23:30:10.994Z","repository":{"id":36844742,"uuid":"41151678","full_name":"vlonjat-gashi/progress-activity","owner":"vlonjat-gashi","description":"Easily add loading, empty and error states in your app.","archived":false,"fork":false,"pushed_at":"2020-06-09T12:21:54.000Z","size":154,"stargazers_count":1015,"open_issues_count":19,"forks_count":171,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-30T04:49:34.448Z","etag":null,"topics":["android","error-handling","error-page","loading-screen","progress-bar"],"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/vlonjat-gashi.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-08-21T11:07:18.000Z","updated_at":"2024-09-14T02:18:50.000Z","dependencies_parsed_at":"2022-08-24T21:50:57.340Z","dependency_job_id":null,"html_url":"https://github.com/vlonjat-gashi/progress-activity","commit_stats":null,"previous_names":["vlonjat-gashi/progress-activity","vlonjatg/progress-activity"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlonjat-gashi%2Fprogress-activity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlonjat-gashi%2Fprogress-activity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlonjat-gashi%2Fprogress-activity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlonjat-gashi%2Fprogress-activity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlonjat-gashi","download_url":"https://codeload.github.com/vlonjat-gashi/progress-activity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647249,"owners_count":21139081,"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","error-handling","error-page","loading-screen","progress-bar"],"created_at":"2024-08-02T01:01:10.273Z","updated_at":"2025-04-12T23:30:10.972Z","avatar_url":"https://github.com/vlonjat-gashi.png","language":"Java","funding_links":[],"categories":["空白页","Java"],"sub_categories":[],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-progress--activity-green.svg?style=flat)](https://android-arsenal.com/details/1/2386)\n\n# progress-activity\n\nIf you are tired of constantly having to set up progress bars, empty views and error views, than this library is for you.\n\n### About\n\nUsing progress-activity you can easily add states like:\n\n- progress bar while the content is loading,\n- empty view to indicate when there are no data to display,\n- error view to indicate when something goes wrong with a button to try again.\n\n### Screenshots\n\n\u003cimg src=\"http://i.imgur.com/oEsvKDc.png\" width=\"250\"\u003e\n\u003cimg src=\"http://i.imgur.com/VLqt4tS.png\" width=\"250\"\u003e\n\u003cimg src=\"http://i.imgur.com/zJY7WIS.png\" width=\"250\"\u003e\n\n### Features\n\n- show/hide progress bar,\n- show/hide empty view,\n- show/hide error view,\n- show content when the data is ready to be displayed,\n\n### Usage\n\nAdd ```com.vlonjatg.progressactivity.ProgressFrameLayout``` or ```com.vlonjatg.progressactivity.ProgressLinearLayout``` or ```com.vlonjatg.progressactivity.ProgressRelativeLayout``` to your layout depending on your usecase:\n\n```xml\n\u003ccom.vlonjatg.progressactivity.ProgressRelativeLayout\n\tandroid:id=\"@+id/progressActivity\"\n    android:layout_width=\"match_parent\"\n\tandroid:layout_height=\"match_parent\"\n    android:layout_below=\"@+id/activityToolbar\"\n    progressActivity:loadingBackgroundColor=\"#FFFFFF\"\n    progressActivity:emptyBackgroundColor=\"#fbc02d\"\n    progressActivity:errorBackgroundColor=\"#42a5f5\"\u003e\n    \n        \u003cTextView\n            android:layout_width=\"fill_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_centerInParent=\"true\"\n            android:gravity=\"center\"\n            android:text=\"@string/hello_world\" /\u003e\n\n    \u003c/com.vlonjatg.progressactivity.ProgressRelativeLayout\u003e\n```\n\nThen in your code:\n\nTo display the loading view:\n\n```java\nprogressActivity.showLoading();\n```\n\nTo display the empty view:\n\n```java\nprogressActivity.showEmpty(emptyDrawable, \"Empty Shopping Cart\", \n\t\t\"Please add things in the cart to continue.\");\n``` \n\nTo display the error view:\n\n```java\nprogressActivity.showError(errorDrawable, \"No Connection\",\n\t\t\"We could not establish a connection with our servers. Try again when you are connected to the interne.\",\n        \"Try Again\", errorClickListener);\n``` \n\nTo show the content, use:\n\n```java\nprogressActivity.showContent()\n```\n\n### Get It\n\n```\nrepositories {\n    maven { url \"https://jitpack.io\" }\n}\n\ndependencies {\n        compile 'com.github.vlonjatg:progress-activity:2.0.5'\n}\n\n```\n\n### Customization\n\nThere are a bunch of attributes to customize the views.\n\n```xml\n\u003cattr name=\"loadingProgressBarWidth\" format=\"dimension\"/\u003e\n\u003cattr name=\"loadingProgressBarHeight\" format=\"dimension\"/\u003e\n\u003cattr name=\"loadingProgressBarColor\" format=\"color\"/\u003e\n\u003cattr name=\"loadingBackgroundColor\" format=\"color\"/\u003e\n\n\u003cattr name=\"emptyImageWidth\" format=\"dimension\"/\u003e\n\u003cattr name=\"emptyImageHeight\" format=\"dimension\"/\u003e\n\u003cattr name=\"emptyTitleTextSize\" format=\"dimension\"/\u003e\n\u003cattr name=\"emptyContentTextSize\" format=\"dimension\"/\u003e\n\u003cattr name=\"emptyTitleTextColor\" format=\"color\"/\u003e\n\u003cattr name=\"emptyContentTextColor\" format=\"color\"/\u003e\n\u003cattr name=\"emptyBackgroundColor\" format=\"color\"/\u003e\n\n\u003cattr name=\"errorImageWidth\" format=\"dimension\"/\u003e\n\u003cattr name=\"errorImageHeight\" format=\"dimension\"/\u003e\n\u003cattr name=\"errorTitleTextSize\" format=\"dimension\"/\u003e\n\u003cattr name=\"errorContentTextSize\" format=\"dimension\"/\u003e\n\u003cattr name=\"errorTitleTextColor\" format=\"color\"/\u003e\n\u003cattr name=\"errorContentTextColor\" format=\"color\"/\u003e\n\u003cattr name=\"errorButtonTextColor\" format=\"color\"/\u003e\n\u003cattr name=\"errorButtonBackgroundColor\" format=\"color\"/\u003e\n\u003cattr name=\"errorBackgroundColor\" format=\"color\"/\u003e\n```\n\n### Example\n\nAn [example](https://github.com/vlonjatg/progress-activity/tree/master/sample) is available.\n\n### Developed By\n\nVlonjat Gashi - [Twitter](https://twitter.com/vlonjatg)\n\n### Attributes\n\nThis library is inspired by [AndroidProgressLayout](https://github.com/antonkrasov/AndroidProgressLayout) library from Anton Krasov.\n\n### License\n\nprogress-activity is available under the [MIT](http://opensource.org/licenses/MIT) licence.\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2015 Vlonjat Gashi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlonjat-gashi%2Fprogress-activity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlonjat-gashi%2Fprogress-activity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlonjat-gashi%2Fprogress-activity/lists"}