{"id":13641442,"url":"https://github.com/hsongxian/SmileRefresh","last_synced_at":"2025-04-20T07:33:43.779Z","repository":{"id":217102269,"uuid":"70797702","full_name":"hsongxian/SmileRefresh","owner":"hsongxian","description":"微笑下拉刷新。这是在 SwipeRefreshLayout基础上修改的下拉刷新库。","archived":false,"fork":false,"pushed_at":"2016-11-01T04:28:05.000Z","size":125,"stargazers_count":197,"open_issues_count":0,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-04T00:04:53.540Z","etag":null,"topics":["android","android-library","listview","recyclerview","refresh","smilerefresh"],"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/hsongxian.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-10-13T10:58:17.000Z","updated_at":"2024-08-04T00:04:53.541Z","dependencies_parsed_at":"2024-01-14T16:09:11.720Z","dependency_job_id":null,"html_url":"https://github.com/hsongxian/SmileRefresh","commit_stats":null,"previous_names":["hsongxian/smilerefresh","songixan/smilerefresh"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsongxian%2FSmileRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsongxian%2FSmileRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsongxian%2FSmileRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsongxian%2FSmileRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hsongxian","download_url":"https://codeload.github.com/hsongxian/SmileRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223822344,"owners_count":17208848,"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","listview","recyclerview","refresh","smilerefresh"],"created_at":"2024-08-02T01:01:20.751Z","updated_at":"2024-11-09T11:31:36.267Z","avatar_url":"https://github.com/hsongxian.png","language":"Java","funding_links":[],"categories":["下拉刷新"],"sub_categories":[],"readme":"# SmileRefresh\n\n\n![这里写图片描述](http://img.blog.csdn.net/20161013202135750)\n\n\n####描述:\n\tPullToRefreshView 是基于v4库的SwipeRefreshLayout上修改的动画的，SwipeRefreshLayout 有的方法PullToRefreshView 也有。\n####引入：\n 1.在Properties的build.gradle 添加\n\t\n```java\nallprojects {\n    repositories {\n        ......\n        maven { url \"https://jitpack.io\" }\n\n    }\n}\n```\n 2.在Module的build.gradle 添加\n```java\n    compile 'com.github.songixan:SmileRefresh:1.1'\n\n```\n\n####用法：\n\n\n\n 1. xml添加\n\t```html\t\n\t\t\u003ccom.song.refresh_view.PullToRefreshView\n\t\t    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t\t    xmlns:tools=\"http://schemas.android.com/tools\"\n\t\t    android:layout_width=\"match_parent\"\n\t\t    android:layout_height=\"match_parent\"\n\t\t    android:id=\"@+id/refreshView\"\n\t\t    tools:context=\"com.songxian.smilerefresh.MainActivity\"\u003e\n\t\t\n\t\t    \u003cListView\n\t\t        android:id=\"@+id/list\"\n\t\t        android:layout_width=\"match_parent\"\n\t\t        android:layout_height=\"match_parent\"\u003e\u003c/ListView\u003e\n\t\t\n\t\t\u003c/com.song.refresh_view.PullToRefreshView\u003e\n\t```\n\n 2. java设置\n\n- 初始化\n\n```java\n\t\tmRefreshView = (PullToRefreshView) findViewById(R.id.refreshView);\n\t\tmRefreshView.setColorSchemeColors(Color.RED,Color.BLUE); // 颜色\n\t\tmRefreshView.setSmileStrokeWidth(8); // 设置绘制的笑脸的宽度\n\t\tmRefreshView.setSmileInterpolator(new LinearInterpolator()); // 笑脸动画转动的插值器\n\t\tmRefreshView.setSmileAnimationDuration(2000); // 设置笑脸旋转动画的时长\n\t\t\t\t//设置下拉刷新监听\n\t\t\tmRefreshView.setOnRefreshListener(new PullToRefreshView.OnRefreshListener() { \n\t\t\t    @Override\n\t\t\t    public void onRefresh() {\n\t\t\t        requestData(); //请求数据\n\t\t\t    }\n\t\t\t\n\t\t\t});\n```\n\n\n\n- 刷新完成\n\n\n```java\n// 请求数据完成\n mRefreshView.setRefreshing(false);\n\n```\n\n\n博客：http://blog.csdn.net/qq_32464809/article/details/52809722\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsongxian%2FSmileRefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhsongxian%2FSmileRefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsongxian%2FSmileRefresh/lists"}