{"id":13641479,"url":"https://github.com/linuxjava/RefreshLayout","last_synced_at":"2025-04-20T11:31:01.608Z","repository":{"id":79069931,"uuid":"83285480","full_name":"linuxjava/RefreshLayout","owner":"linuxjava","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-28T02:05:35.000Z","size":3529,"stargazers_count":89,"open_issues_count":1,"forks_count":20,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-03T01:23:11.653Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/linuxjava.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":"2017-02-27T08:16:10.000Z","updated_at":"2021-11-09T14:04:24.000Z","dependencies_parsed_at":"2024-01-14T11:07:17.543Z","dependency_job_id":"165adf6b-d227-4c7b-85a5-6ab17000c448","html_url":"https://github.com/linuxjava/RefreshLayout","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/linuxjava%2FRefreshLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxjava%2FRefreshLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxjava%2FRefreshLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxjava%2FRefreshLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxjava","download_url":"https://codeload.github.com/linuxjava/RefreshLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223827349,"owners_count":17209776,"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-08-02T01:01:21.078Z","updated_at":"2024-11-09T12:30:16.739Z","avatar_url":"https://github.com/linuxjava.png","language":"Java","readme":"# RefreshLayout\n\n项目特点\n* 支持RecycView、Listview、ScrollView、各种布局控件实现下拉刷新和上拉加载；\n* 该项目的设计结构和整体业务逻辑清晰，各细节功能点的处理考虑全面；\n* 对项目的整体开发步骤以及所有晦涩难懂的点，都有详细注释，非常适合中高端工程师学习并进行二次开发\n\n![image](https://github.com/linuxjava/RefreshLayout/raw/master/gif/note.png)\n\n##  APK下载\n[Download](https://github.com/linuxjava/RefreshLayout/raw/master/apk/app-debug.apk)\n##  Demo使用\n运行demo需删除gradle.properties中的代理\n```xml\nsystemProp.http.proxyHost=dev-proxy.oa.com\nsystemProp.http.proxyPort=8080\nsystemProp.https.proxyHost=dev-proxy.oa.com\nsystemProp.https.proxyPort=8080\n```\n## Gradle配置\n```xml\ncompile 'xiao.free.refreshlayout:refreshlayoutlib:v1.0.0'\n```\n\n## XML配置\n```xml\n\u003cxiao.free.refreshlayoutlib.SwipeRefreshLayout\n        android:id=\"@+id/swiperefreshlayout\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\u003e\n\n        \u003cinclude\n            android:id=\"@id/swipe_refresh_header\"\n            layout=\"@layout/layout_classic_header\" /\u003e\n\n        \u003cListView\n            android:id=\"@id/swipe_target\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:clipToPadding=\"false\" /\u003e\n\n        \u003cinclude\n            android:id=\"@id/swipe_load_more_footer\"\n            layout=\"@layout/layout_classic_footer\" /\u003e\n\n\u003c/xiao.free.refreshlayoutlib.SwipeRefreshLayout\u003e\n```\n## 属性说明\n|属性|说明|\n|----|-----\n|refresh_enabled|刷新使能\n|load_more_enabled|加载使能\n|swipe_style|header和footer模式\n|drag_ratio|drag阻尼系数，越小越难拉动\n|refresh_trigger_offset|触发刷新的偏移，默认为header高度\n|load_more_trigger_offset|触发加载更多的偏移，默认为footer高度\n|refresh_final_drag_offset|下拉最大偏移，默认为0\n|load_more_final_drag_offset|加载更多最大偏移，默认为0\n\n## 效果图\n如下图所示：\n\n![image](https://github.com/linuxjava/RefreshLayout/raw/master/gif/1.gif)\n![image](https://github.com/linuxjava/RefreshLayout/raw/master/gif/2.gif)\n![image](https://github.com/linuxjava/RefreshLayout/raw/master/gif/3.gif)\n![image](https://github.com/linuxjava/RefreshLayout/raw/master/gif/4.gif)\n\n## 使用bug注意\n|id注意事项|\n|----|\n|xml布局中header的id需定义为swipe_refresh_header|\n|目标view id需定义为swipe_target|\n|xml布局中footer的id需定义为swipe_refresh_header|\n\n* 使用BLOW和SCALE模式时，ListView或其Item需要有背景颜色，否则在这两种模式下会存在bug\n\n![image](https://github.com/linuxjava/RefreshLayout/raw/master/gif/error.gif)\n","funding_links":[],"categories":["下拉刷新"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxjava%2FRefreshLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxjava%2FRefreshLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxjava%2FRefreshLayout/lists"}