{"id":18789203,"url":"https://github.com/dsiner/pulllayout","last_synced_at":"2026-03-16T07:10:14.223Z","repository":{"id":202173164,"uuid":"89464628","full_name":"Dsiner/PullLayout","owner":"Dsiner","description":"A reusable Pull to Refresh library for Android. Support RecyclerView ListView ScrollView ViewPager CoordinatorLayout. Sliding damping, supports all directions. Drag and drop sort. You can use it like a standard RecyclerView -适用于Android的下拉刷新, 加载更多库. 滑动阻尼, 支持所有方向. 支持RecyclerView ListView ScrollView ViewPager CoordinatorLayout. 拖放排序.","archived":false,"fork":false,"pushed_at":"2021-01-10T15:58:40.000Z","size":1420,"stargazers_count":31,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-14T18:53:15.231Z","etag":null,"topics":["common-adapter","itemtouchhelper","loadmore","mulitiple","pulltorefresh","recyclerview","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/Dsiner.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-04-26T09:44:17.000Z","updated_at":"2024-08-18T14:44:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"52f471ca-3d31-4ccb-8f28-45bd56005a9e","html_url":"https://github.com/Dsiner/PullLayout","commit_stats":null,"previous_names":["dsiner/pulllayout"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dsiner/PullLayout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FPullLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FPullLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FPullLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FPullLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dsiner","download_url":"https://codeload.github.com/Dsiner/PullLayout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dsiner%2FPullLayout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30571365,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-16T06:02:37.763Z","status":"ssl_error","status_checked_at":"2026-03-16T06:02:14.913Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["common-adapter","itemtouchhelper","loadmore","mulitiple","pulltorefresh","recyclerview","refreshlayout"],"created_at":"2024-11-07T21:06:56.411Z","updated_at":"2026-03-16T07:10:14.184Z","avatar_url":"https://github.com/Dsiner.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PullLayout for Android\n\n[![License](https://img.shields.io/badge/license-Apache%202-green.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![API](https://img.shields.io/badge/API-11%2B-green.svg?style=flat)](https://android-arsenal.com/api?level=11)\n[![Download](https://api.bintray.com/packages/dsiner/maven/pulllayout/images/download.svg) ](https://bintray.com/dsiner/maven/pulllayout/_latestVersion)\n\n\u003e A reusable Pull to Refresh library for Android.\n\n## Set up\nMaven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.dsiner.lib\u003c/groupId\u003e\n  \u003cartifactId\u003epulllayout\u003c/artifactId\u003e\n  \u003cversion\u003e2.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nor Gradle:\n```groovy\n// AndroidX\nimplementation 'com.dsiner.lib:pulllayout:2.0.0'\n// Or Support\nimplementation 'com.dsiner.lib:pulllayout:1.0.4'\n```\n\n## Features\n * Supports both Pulling Down from the top, and Pulling Up from the bottom (or even both).\n * Animated Scrolling for all devices.\n * Currently works with:\n \t* **RecyclerView**\n \t* **ListView**\n \t* **ScrollView**\n \t* **WebView**\n \t* **ViewPager**\n \t* **CoordinatorLayout**\n * Integrated End of List Listener for use of detecting when the user has scrolled to the bottom.\n * Callback method to be invoked when Pullable's scroll state changes.\n * Dynamically add headers and footers.\n * Support `duration` `factor` `TimeInterpolator`\n * Sliding damping, supports all directions (`left` `top` `right` `bottom`).\n * Multi-type adapter support.\n * Drag and drop sort.\n * Lots of [Customisation](https://github.com/Dsiner/PullLayout/blob/master/app/src/main/java/com/d/pulllayout/MainActivity.java) options!\n\n## Screenshot\n![Artboard](https://github.com/Dsiner/Resouce/blob/master/lib/PullLayout/pulllayout.png)\n\n## How do I use it?\n\n## Configuration ##\n\n### Via XML ###\n#### Damp ####\n```XML\n    \u003ccom.d.lib.pulllayout.PullLayout\n        ...\n        app:lib_pull_enable=\"true\"\n        app:lib_pull_gravity=\"left|top|right|bottom\"\u003e\n\n        \u003cViewGroup\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" /\u003e\n\n    \u003c/com.d.lib.pulllayout.PullLayout\u003e\n```\n\n|  attribute name | description |\n|---|---|\n| lib_pull_enable  | Draggable |\n| lib_pull_gravity  | Draggable direction |\n\n#### Pull to Refresh list ####\n```XML\n    \u003ccom.d.lib.pulllayout.PullRecyclerLayout\n        ...\n        app:lib_pull_type=\"recyclerView\" /\u003e\n```\n\n|  attribute name | description |\n|---|---|\n| lib_pull_type | Nested style - `PullRecyclerview` (by default) or `RecyclerView` or `ListView` |\n\n## Animation ##\n\n### Refreshing callback ###\nJust implement `Refreshable.OnRefreshListener`:\n\n```Java\n\nmPullList.setOnRefreshListener(new Refreshable.OnRefreshListener() {\n    @Override\n    public void onRefresh() {\n        // Refresh your data here\n    }\n\n    @Override\n    public void onLoadMore() {\n        // Load your data here\n    }\n});\n```\n\n### Pulling callback ###\nJust implement `Pullable.OnPullListener`:\n\n```Java\n\nmPullList.addOnPullListener(new Pullable.OnPullListener() {\n    @Override\n    public void onPullStateChanged(Pullable pullable, int newState) {\n        // Callback method to be invoked when Pullable's scroll state changes.\n    }\n\n    @Override\n    public void onPulled(Pullable pullable, int dx, int dy) {\n        // Callback method to be invoked when the Pullable has been scrolled.\n    }\n});\n```\n\n### To start or stop animation: ###\n\n```Java\nmPullList.refresh();\nmPullList.loadMore();\nmPullList.refreshSuccess();\nmPullList.refreshError();\nmPullList.loadMoreSuccess();\nmPullList.loadMoreError();\nmPullList.loadMoreNoMore();\n```\n\n### Using custom views ###\nFor using custom views just implement `IEdgeView`:\n\n```Java\n\nmPullList.setHeader(new HeaderView(context));\nmPullList.setFooter(new FooterView(context));\n```\n\n## Adapter ##\n\n### Simple adapter ###\n```Java\npublic class SimpleAdapter extends CommonAdapter\u003cBean\u003e {\n\n    public SimpleAdapter(Context context, List\u003cBean\u003e datas, int layoutId) {\n        super(context, datas, layoutId);\n    }\n\n    @Override\n    public void convert(final int position, CommonHolder holder, Bean item) {\n        ...\n    }\n}\n```\n\n### Multiple adapter ###\n```Java\npublic class MultipleAdapter extends CommonAdapter\u003cBean\u003e {\n\n    public MultipleAdapter(Context context, List\u003cBean\u003e datas, MultiItemTypeSupport\u003cBean\u003e multiItemTypeSupport) {\n        super(context, datas, multiItemTypeSupport);\n    }\n\n    @Override\n    public void convert(final int position, CommonHolder holder, Bean item) {\n        switch (holder.layoutId) {\n            ...\n        }\n    }\n}\n```\n\n### Support headers or footers ###\n```Java\nmPullList.addHeaderView(view);\nmPullList.addFooterView(view);\n\nmPullList.removeHeaderView(view);\nmPullList.removeFooterView(view);\n```\n\nMore usage see [Demo](app/src/main/java/com/d/pulllayout/MainActivity.java)\n\n## Thanks\n- [Android-PullToRefresh](https://github.com/chrisbanes/Android-PullToRefresh)  - A pull to refresh widget\n- [XRecyclerView](https://github.com/jianghejie/XRecyclerView)  - RecyclerView that implements pullrefresh , loadingmore and header featrues\n\n## Licence\n\n```txt\nCopyright 2018 D\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsiner%2Fpulllayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsiner%2Fpulllayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsiner%2Fpulllayout/lists"}