{"id":18021312,"url":"https://github.com/gcssloop/leafloading","last_synced_at":"2025-03-26T22:30:45.407Z","repository":{"id":95110903,"uuid":"47918483","full_name":"GcsSloop/LeafLoading","owner":"GcsSloop","description":"LeafLoding Progress","archived":false,"fork":false,"pushed_at":"2016-07-30T00:01:00.000Z","size":1368,"stargazers_count":78,"open_issues_count":3,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-22T14:22:13.321Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GcsSloop.png","metadata":{"files":{"readme":"README.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-13T12:33:55.000Z","updated_at":"2024-07-29T05:29:09.000Z","dependencies_parsed_at":"2023-04-24T23:16:53.825Z","dependency_job_id":null,"html_url":"https://github.com/GcsSloop/LeafLoading","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/GcsSloop%2FLeafLoading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FLeafLoading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FLeafLoading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GcsSloop%2FLeafLoading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GcsSloop","download_url":"https://codeload.github.com/GcsSloop/LeafLoading/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245747434,"owners_count":20665791,"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-10-30T06:09:32.114Z","updated_at":"2025-03-26T22:30:45.396Z","avatar_url":"https://github.com/GcsSloop.png","language":"Java","readme":"\u003cimg src=\"https://github.com/GcsSloop/LeafLoading/blob/master/Art/title.png\" width = \"300\" height = \"75\" alt=\"title\" align=center /\u003e  \n\n[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven Central](https://img.shields.io/bintray/v/gcssloop/maven/leafloding.svg)](https://bintray.com/gcssloop/maven/leafloding/view)\n### 作者微博: [@攻城师sloop](http://weibo.com/5459430586)\n## 声明\n  由于该项目的创意来自于网络，并未寻找到原作者，所以可能存在侵权行为，使用前请慎重。如果您是该创意原作者，感觉侵犯了您的权利，可以在微博上联系我，侵删。\n  \n  另外，该项目核心实现代码来参考了一位CSDN大神的博客：详戳-\u003e[【一个绚丽的loading动效分析与实现！】](http://blog.csdn.net/tianjian4592/article/details/44538605)。\n```\n我在原有代码基础上进行了部分内容的修改，主要包括以下方面:\n  0.添加风扇部分绘制\n  1.修改了View测量逻辑\n  2.对视图大小进行了适配\n  3.添加了监听回调接口\n  \n目前仍存在的问题(待完善或者添加的功能)\n  0.绑定风扇转速 树叶数量 和进度快慢之间的关系\n\n如果你对此有好的想法欢迎在Issues中提交。\n```\n  \n  \n## 创意原型\n\n#### 原型效果图如下：\n![LeafLoading](https://github.com/GcsSloop/LeafLoading/blob/master/Art/model.gif)\n#### 实现效果图如下：\n![LeafLoadingDemo](https://github.com/GcsSloop/LeafLoading/blob/master/Art/loadingTest.gif)\n\n目前实现了原型中百分之九十左右的内容。\n\n---\n## 如何使用\n### 1.在布局文件中添加LeafLoding\n``` xml\n    \u003ccom.sloop.view.loading.LeafLoading\n        android:id=\"@+id/loading\"\n        android:layout_centerInParent=\"true\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"/\n```\n### 2.在Activity中找到组件\n``` java\n    //找到组件\n    LeafLoading loading = (LeafLoading) findViewById(R.id.loading);\n    //设置进度\n    loading.setProgress(50);\n    //PS：作为一个这么高大上的自定义View，当然不会只有一个setProgress方法了，关于其他用法，请看后续的说明文档\n```\n\n---\n## 如何添加进项目中\n### Android Studio\n#### 1.在Project的build.gradle中添加仓库地址\n```\n //sloop的仓库地址\n  maven {url \"http://dl.bintray.com/gcssloop/maven\"}\n```\n示例：\n```\nallprojects {\n    repositories {\n        jcenter()\n        //sloop的仓库地址\n        maven {url \"http://dl.bintray.com/gcssloop/maven\"}\n    }\n}\n```\n#### 2.在Module目录下的build.gradle中添加依赖\n```\n  //leafloding\n    compile 'com.sloop.view.loading:leafloading:1.0.1'\n```\n示例：\n```\n  dependencies {\n    compile fileTree(dir: 'libs', include: ['*.jar'])\n    testCompile 'junit:junit:4.12'\n    compile 'com.android.support:appcompat-v7:23.0.1'\n    //leafloding\n    compile 'com.sloop.view.loading:leafloading:1.0.0'\n}\n```\n\n### Eclipse\n#### 1.下载Library\n#### 2.将资源文件分别拷贝进工程中\n```\n资源文件包括：\n/res/drawable-xxxhdpi文件夹下的所有图片\n代码包括：\ncom.sloop.view.loding.LeafLoding.java\ncom.sloop.view.utils.UiUtils.java\n```\n---\n## 更新内容：\n版本号 | 更新内容\n ---   |  ---\nv1.0.0 | 完善基本功能，进行大小适配\nv1.0.1 | 完善注释文档，添加监听回调\n\n---\n## 致谢：\n  感谢原作者 [学问积年而成](http://blog.csdn.net/tianjian4592?viewmode=list) 提供的实现原型。\n\n## About Me\n\n### 作者微博: [@GcsSloop](http://weibo.com/GcsSloop)\n\n\u003ca href=\"https://github.com/GcsSloop/README/blob/master/README.md\" target=\"_blank\"\u003e \u003cimg src=\"http://ww4.sinaimg.cn/large/005Xtdi2gw1f1qn89ihu3j315o0dwwjc.jpg\" width=300 height=100 /\u003e \u003c/a\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcssloop%2Fleafloading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcssloop%2Fleafloading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcssloop%2Fleafloading/lists"}