{"id":13641513,"url":"https://github.com/lovejjfg/PowerRefresh","last_synced_at":"2025-04-20T11:31:06.133Z","repository":{"id":96484559,"uuid":"89895282","full_name":"lovejjfg/PowerRefresh","owner":"lovejjfg","description":"Support nested scroll for refresh and load more.","archived":false,"fork":false,"pushed_at":"2019-04-28T02:41:49.000Z","size":748,"stargazers_count":65,"open_issues_count":0,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T01:23:30.976Z","etag":null,"topics":["loadmore","nestedscrollview","pull-refresh-layout","refreshlayout"],"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/lovejjfg.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}},"created_at":"2017-05-01T03:44:00.000Z","updated_at":"2024-07-05T17:32:56.000Z","dependencies_parsed_at":"2023-03-13T16:30:50.324Z","dependency_job_id":null,"html_url":"https://github.com/lovejjfg/PowerRefresh","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/lovejjfg%2FPowerRefresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovejjfg%2FPowerRefresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovejjfg%2FPowerRefresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovejjfg%2FPowerRefresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovejjfg","download_url":"https://codeload.github.com/lovejjfg/PowerRefresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223827368,"owners_count":17209781,"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":["loadmore","nestedscrollview","pull-refresh-layout","refreshlayout"],"created_at":"2024-08-02T01:01:21.400Z","updated_at":"2024-11-09T12:30:20.609Z","avatar_url":"https://github.com/lovejjfg.png","language":"Java","funding_links":[],"categories":["下拉刷新","Java"],"sub_categories":[],"readme":"## PowerReresh\n\nThis library support **nested scroll** for refresh and load more,so you can use it with `CoordinatorLayout` and `AppBarLayout` and so no.You can design your self header or footer easily.  [中文文档](https://github.com/lovejjfg/PowerRefresh/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E)\n\n![screen](https://raw.githubusercontent.com/lovejjfg/screenshort/master/power_refresh.gif)\n\n[ ![Download](https://api.bintray.com/packages/lovejjfg/maven/PowerRefresh/images/download.svg) ](https://bintray.com/lovejjfg/maven/PowerRefresh/_latestVersion) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PowerRefresh-orange.svg?style=flat)](https://android-arsenal.com/details/1/5677)\n\n\n### Add Header\n\n\t   CircleHeaderView header = new CircleHeaderView(getContext());\n        mRefreshLayout.addHeader(header);\n### Add footer\n\n\tFootView footView = new FootView(getContext());\n\tmRefreshLayout.addFooter(header);\n\n### Callback\n\nyou should make `Header` impl `HeaderListener`,so you can know the refresh state.and to `Footer` with `FooterListener`.\n\n\n    mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {\n        @Override\n        public void onRefresh() {\n\t\t\t//doRefresh\n        }\n\n        @Override\n        public void onLoadMore() {\n          //doLoadmore\n        }\n    });\n\n\n\n### Layout\n\n\n\t\u003ccom.lovejjfg.powerrefresh.PowerRefreshLayout\n    android:id=\"@+id/refresh_layout\"\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    \u003e\n\t    \u003candroid.support.v7.widget.RecyclerView\n\t        android:id=\"@+id/recycler\"\n\t        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n\t        xmlns:tools=\"http://schemas.android.com/tools\"\n\t        android:layout_width=\"match_parent\"\n\t        android:layout_height=\"match_parent\"\n\t        tools:context=\"com.lovejjfg.demo.MainActivity\"\u003e\n\t    \u003c/android.support.v7.widget.RecyclerView\u003e\n\n\t\u003c/com.lovejjfg.powerrefresh.PowerRefreshLayout\u003e\n\n### Tips \n\n* If you want to refresh when first init call  `setAutoRefresh(true)` on MainThread.\n* If you don't want to add any Footer,but loadmore, you should call `setAutoRefresh(true)` ,and at last, you should call `setLoadEnable(mAdapter.getList().size() \u003c 50)` to make RefreshLayout  konw whether is there any more nor not.\n\n* Refresh finish,you should call `stopRefresh(boolean isSuccess)` to make RefreshLayout  konw that refresh is over,then the header will disappeared as soon as possible. **if you want header disappeare delay, you can call** `stopRefresh(boolean isSuccess, long delay)`\n\n* which height should go to start refresh ? If height is not specified,the default is the header's height. you can return the height by impl `HeaderListener`:\n\n\t    @Override\n\t    public int getRefreshHeight() {\n\t        return (int) (getMeasuredHeight()*0.8f);\n\t    }\n\n* If there is only one header or footer in you project ,dont forget to extend PowerRefreshLoayout and add header or footer once.\n\n### Thanks\n\nThanks to [@dalong982242260](https://github.com/dalong982242260/PullRefresh) and Android `SwipeRefreshLayout`.\n\n\n### License\n\n\t   Copyright (c) 2017.  Joe\n\t   Licensed under the Apache License, Version 2.0 (the \"License\");\n\t   you may not use this file except in compliance with the License.\n\t   You may obtain a copy of the License at\n\t      http://www.apache.org/licenses/LICENSE-2.0\n\t   Unless required by applicable law or agreed to in writing, software\n\t   distributed under the License is distributed on an \"AS IS\" BASIS,\n\t   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t   See the License for the specific language governing permissions and\n\t   limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovejjfg%2FPowerRefresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovejjfg%2FPowerRefresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovejjfg%2FPowerRefresh/lists"}