GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 1. · PMonkeyCoding/SmartRefreshLayout@a3b1217

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • README_EN.md
  • app/src/main
    • java/com/scwang/refreshlayout/fragment/index
      • RefreshStylesFragment.java
    • res/layout
      • fragment_refresh_example.xml
      • fragment_refresh_styles.xml
  • art
    • md_custom.md
    • md_donationlist.md
    • md_faq.md
    • md_property.md
    • md_update.md
  • refresh-header/src/main/java/com/scwang/smart/refresh/header
    • BezierCircleHeader.java
    • DeliveryHeader.java
    • DropBoxHeader.java
    • FlyRefreshHeader.java
    • PhoenixHeader.java
    • StoreHouseHeader.java
    • TaurusHeader.java
    • WaterDropHeader.java
    • WaveSwipeHeader.java
    • fungame
      • FunGameBase.java
  • refresh-layout/src/main/java/com/scwang/smartrefresh/layout
    • SmartRefreshLayout.java
    • api
      • RefreshLayout.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SmartRefreshLayout以打造一个强大,稳定,成熟的下拉刷新框架
3333
- 支持设多种滑动方式:平移、拉伸、背后固定、顶层固定、全屏
3434
- 支持所有可滚动视图的越界回弹
3535
- 支持 Header 和 Footer 交换混用
36-
- 支持AndroidX
36+
- 支持 AndroidX
3737
- 支持[横向刷新](https://github.com/scwang90/SmartRefreshHorizontal)
3838

3939
## 每天领红包
@@ -129,7 +129,8 @@ V2.x 版本已经把依赖库拆分成8个包啦,用到的时候自行引用
129129
## 简单用例
130130
#### 1.在 build.gradle 中添加依赖
131131

132-
2.0.0 相对于 1.x 对包名做了修改如:com.scwang.smartrefresh 改为 com.scwang.smart.refresh。
132+
V2.x 相对于 V1.x 对包名做了修改如:com.scwang.smartrefresh 改为 com.scwang.smart.refresh。
133+
建议在新项目中使用,如果项目升级,java,xml 中都需要做包名替换,比较麻烦。
133134
但主要改动还是对 Smart 进行分包,减小不必要的依赖,比如不使用二级刷新就不依赖,避免代码冗余。
134135
但是未对 SmartRefreshHeader 分包,里面有十多个Header,建议需要使用哪个就复制哪个的源码到项目中。
135136
当然:大家也可以在讨论区讨论投票,选出里面使用频率比较高的Header,然后单独分离出来。
Collapse file

‎README_EN.md‎

Copy file name to clipboardExpand all lines: README_EN.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ Please rest assured that I have divided it into eight packages, when used to ref
105105
#### 1.Add a gradle dependency.
106106

107107
V 2.x changed the package name relative to 1.x, such as `com.scwang.smartrefresh` to `com.scwang.smart.refresh`.
108+
It is suggested that in the new project, if the old project is upgraded,
109+
the package name should be replaced, which is more troublesome.
108110
But the main change is to subcontract SmartRefreshLayout to reduce unnecessary dependencies and avoid code redundancy.
109111
However, there is no subcontracting to SmartRefreshHeader.
110112
There are more than ten headers in it.
Collapse file

‎app/src/main/java/com/scwang/refreshlayout/fragment/index/RefreshStylesFragment.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/scwang/refreshlayout/fragment/index/RefreshStylesFragment.java
+16-20Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.scwang.refreshlayout.fragment.index;
22

3-
43
import android.content.Intent;
54
import android.os.Bundle;
65
import android.support.annotation.NonNull;
@@ -34,24 +33,21 @@
3433
import com.scwang.refreshlayout.adapter.BaseRecyclerAdapter;
3534
import com.scwang.refreshlayout.adapter.SmartViewHolder;
3635
import com.scwang.refreshlayout.util.StatusBarUtil;
37-
import com.scwang.smartrefresh.header.BezierCircleHeader;
38-
import com.scwang.smartrefresh.header.DeliveryHeader;
39-
import com.scwang.smartrefresh.header.DropBoxHeader;
40-
import com.scwang.smartrefresh.header.FunGameHitBlockHeader;
41-
import com.scwang.smartrefresh.header.PhoenixHeader;
42-
import com.scwang.smartrefresh.header.TaurusHeader;
43-
import com.scwang.smartrefresh.layout.api.RefreshFooter;
44-
import com.scwang.smartrefresh.layout.api.RefreshHeader;
45-
import com.scwang.smartrefresh.layout.api.RefreshLayout;
46-
import com.scwang.smartrefresh.layout.constant.RefreshState;
47-
import com.scwang.smartrefresh.layout.footer.BallPulseFooter;
48-
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
49-
import com.scwang.smartrefresh.layout.header.ClassicsHeader;
50-
import com.scwang.smartrefresh.layout.impl.RefreshFooterWrapper;
51-
import com.scwang.smartrefresh.layout.impl.RefreshHeaderWrapper;
52-
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
53-
import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
54-
import com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener;
36+
import com.scwang.smart.refresh.footer.BallPulseFooter;
37+
import com.scwang.smart.refresh.header.BezierCircleHeader;
38+
import com.scwang.smart.refresh.header.ClassicsHeader;
39+
import com.scwang.smart.refresh.header.DeliveryHeader;
40+
import com.scwang.smart.refresh.header.DropBoxHeader;
41+
import com.scwang.smart.refresh.header.FunGameHitBlockHeader;
42+
import com.scwang.smart.refresh.header.PhoenixHeader;
43+
import com.scwang.smart.refresh.header.TaurusHeader;
44+
import com.scwang.smart.refresh.layout.api.RefreshFooter;
45+
import com.scwang.smart.refresh.layout.api.RefreshHeader;
46+
import com.scwang.smart.refresh.layout.api.RefreshLayout;
47+
import com.scwang.smart.refresh.layout.constant.RefreshState;
48+
import com.scwang.smart.refresh.layout.simple.SimpleMultiListener;
49+
import com.scwang.smart.refresh.layout.wrapper.RefreshFooterWrapper;
50+
import com.scwang.smart.refresh.layout.wrapper.RefreshHeaderWrapper;
5551

5652
import java.util.Arrays;
5753

@@ -141,7 +137,7 @@ protected void onBindViewHolder(SmartViewHolder holder, Item model, int position
141137

142138
RefreshLayout refreshLayout = root.findViewById(R.id.refreshLayout);
143139
if (refreshLayout != null) {
144-
refreshLayout.setOnMultiPurposeListener(new SimpleMultiPurposeListener() {
140+
refreshLayout.setOnMultiListener(new SimpleMultiListener() {
145141
@Override
146142
public void onRefresh(@NonNull final RefreshLayout refreshLayout) {
147143
refreshLayout.finishRefresh(3000);
Collapse file

‎app/src/main/res/layout/fragment_refresh_example.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/layout/fragment_refresh_example.xml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
android:id="@+id/toolbar"
1111
app:title="@string/fragment_refresh_example"/>
1212

13-
<com.scwang.smartrefresh.layout.SmartRefreshLayout
13+
<com.scwang.smart.refresh.layout.SmartRefreshLayout
1414
android:id="@+id/refreshLayout"
1515
android:layout_width="match_parent"
1616
android:layout_height="match_parent"
1717
app:srlEnableNestedScrolling="true"
1818
app:srlPrimaryColor="@color/colorPrimary"
1919
app:srlAccentColor="@android:color/white"
2020
app:srlEnableAutoLoadMore="false">
21-
<com.scwang.smartrefresh.layout.header.ClassicsHeader
21+
<com.scwang.smart.refresh.header.ClassicsHeader
2222
android:layout_width="match_parent"
2323
android:layout_height="wrap_content"
2424
app:srlAccentColor="#aaa"
@@ -32,9 +32,9 @@
3232
android:background="@android:color/white"
3333
android:overScrollMode="never"
3434
tools:listitem="@android:layout/simple_list_item_2"/>
35-
<com.scwang.smartrefresh.header.PhoenixHeader
35+
<com.scwang.smart.refresh.header.PhoenixHeader
3636
android:layout_width="match_parent"
3737
android:layout_height="wrap_content" />
38-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
38+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
3939

4040
</LinearLayout>
Collapse file

‎app/src/main/res/layout/fragment_refresh_styles.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/layout/fragment_refresh_styles.xml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
android:id="@+id/toolbar"
1111
app:title="@string/fragment_refresh_styles"/>
1212

13-
<com.scwang.smartrefresh.layout.SmartRefreshLayout
13+
<com.scwang.smart.refresh.layout.SmartRefreshLayout
1414
android:id="@+id/refreshLayout"
1515
android:layout_width="match_parent"
1616
android:layout_height="match_parent"
@@ -19,7 +19,7 @@
1919
app:srlEnableLoadMore="true"
2020
app:srlEnableAutoLoadMore="false"
2121
app:srlEnablePreviewInEditMode="true">
22-
<com.scwang.smartrefresh.layout.footer.BallPulseFooter
22+
<com.scwang.smart.refresh.footer.BallPulseFooter
2323
android:layout_width="match_parent"
2424
android:layout_height="wrap_content"/>
2525
<android.support.v7.widget.RecyclerView
@@ -29,9 +29,9 @@
2929
android:background="@android:color/white"
3030
android:overScrollMode="never"
3131
tools:listitem="@android:layout/simple_list_item_2"/>
32-
<com.scwang.smartrefresh.header.TaurusHeader
32+
<com.scwang.smart.refresh.header.TaurusHeader
3333
android:layout_width="match_parent"
3434
android:layout_height="wrap_content"/>
35-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
35+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
3636

3737
</LinearLayout>
Collapse file

‎art/md_custom.md‎

Copy file name to clipboardExpand all lines: art/md_custom.md
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Header ,不用去关心滑动事件处理,不用关心子控件的回弹和
4444

4545
![](jpg_uml.jpg)
4646

47+
这里还有一份更完整的[类图](https://sourcespy.com/xxxx-00gh03zz),所有的类都在里面。
48+
4749
### 优势特点
4850
网上其他的开源下拉控件一样的可以自定义 Header 和 Footer ,SmartRefreshLayout 和它们
4951
比起来有什么优势?
Collapse file

‎art/md_donationlist.md‎

Copy file name to clipboardExpand all lines: art/md_donationlist.md
+22-21Lines changed: 22 additions & 21 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,31 @@
44

55
|昵称|日期|方式|留言|友情连接|
66
|:---:|:---:|:---:|:---:|:---:|
7-
|[未留名]|2019-7-31|微信|请大佬喝咖啡|👍👍👍👍👍👍
8-
|[pay_join]|2019-7-26|腾讯|👍|
9-
|[pay_join]|2019-7-26|腾讯|👍|
10-
|[*星]|2019-7-19|腾讯|~~~|
11-
|[pay_join]|2019-7-14|腾讯|👍|
12-
|[pay_join]|2019-7-2|腾讯|👍|
13-
|[pay_join]|2019-6-27|腾讯|👍|
7+
|[*一铭]|2019-8-9|阿里|请大佬一杯卡布奇诺?|👍👍👍|
8+
|[未留名]|2019-7-31|微信|请大佬喝咖啡|👍👍👍👍👍👍|
9+
|[pay_join]|2019-7-26|腾讯|👍||
10+
|[pay_join]|2019-7-26|腾讯|👍||
11+
|[*星]|2019-7-19|腾讯|~~~||
12+
|[pay_join]|2019-7-14|腾讯|👍||
13+
|[pay_join]|2019-7-2|腾讯|👍||
14+
|[pay_join]|2019-6-27|腾讯|👍||
1415
|[*陈]|2019-6-26|阿里|👍||
15-
|[pay_join]|2019-6-25|腾讯|👍|
16-
|[pay_join]|2019-6-14|腾讯|👍|
17-
|[pay_join]|2019-5-30|腾讯|👍|
16+
|[pay_join]|2019-6-25|腾讯|👍||
17+
|[pay_join]|2019-6-14|腾讯|👍||
18+
|[pay_join]|2019-5-30|腾讯|👍||
1819
|[*兵]|2019-5-29|阿里|👍👍|[github/faith-hb/WidgetCase](https://github.com/faith-hb/WidgetCase)|
19-
|[pay_join]|2019-5-27|腾讯|👍|
20-
|[pay_join]|2019-5-24|腾讯|👍|
21-
|[pay_join]|2019-5-7|腾讯|👍|
22-
|[pay_join]|2019-5-6|腾讯|👍|
23-
|[pay_join]|2019-4-27|腾讯|👍|
24-
|[pay_join]|2019-4-19|腾讯|👍|
25-
|[pay_join]|2019-4-17|腾讯|👍|
20+
|[pay_join]|2019-5-27|腾讯|👍||
21+
|[pay_join]|2019-5-24|腾讯|👍||
22+
|[pay_join]|2019-5-7|腾讯|👍||
23+
|[pay_join]|2019-5-6|腾讯|👍||
24+
|[pay_join]|2019-4-27|腾讯|👍||
25+
|[pay_join]|2019-4-19|腾讯|👍||
26+
|[pay_join]|2019-4-17|腾讯|👍||
2627
|*少臣|2019-4-17|阿里|👍👍👍👍👍👍👍👍👍👍👍|[github/Bamboy120315/Freedom](https://github.com/Bamboy120315/Freedom)|
27-
|[pay_join]|2019-4-16|腾讯|👍|
28-
|[pay_join]|2019-4-16|腾讯|👍|
29-
|[pay_join]|2019-4-14|腾讯|👍|
30-
|[pay_join]|2019-4-12|腾讯|👍|
28+
|[pay_join]|2019-4-16|腾讯|👍||
29+
|[pay_join]|2019-4-16|腾讯|👍||
30+
|[pay_join]|2019-4-14|腾讯|👍||
31+
|[pay_join]|2019-4-12|腾讯|👍||
3132
|[pay_join]|2019-4-4|腾讯|👍||
3233
|[未留名]|2019-4-3|阿里|||
3334
|[未留名]|2019-3-27|腾讯|||
Collapse file

‎art/md_faq.md‎

Copy file name to clipboardExpand all lines: art/md_faq.md
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ SmartRefresh默认使用了比较新的功能,如:越界回弹、越界拖
1212
~~~
1313
XML属性
1414
~~~xml
15-
<com.scwang.smartrefresh.layout.SmartRefreshLayout
15+
<com.scwang.smart.refresh.layout.SmartRefreshLayout
1616
xmlns:app="http://schemas.android.com/apk/res-auto"
1717
android:layout_width="match_parent"
1818
android:layout_height="match_parent"
1919
app:srlEnableOverScrollDrag="false"
2020
app:srlEnableAutoLoadMore="false"
2121
app:srlEnableOverScrollBounce="false">
22-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
22+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
2323
~~~
2424

2525
## 1.获取当前状态?isRefreshing(),isLoading() 不见了?(1.1.0以上版本,2.x 回归)
@@ -56,12 +56,12 @@ SmartRefresh提供了对数据不满一页判断处理,可以通过EnableLoadM
5656
~~~
5757
XML属性
5858
~~~xml
59-
<com.scwang.smartrefresh.layout.SmartRefreshLayout
59+
<com.scwang.smart.refresh.layout.SmartRefreshLayout
6060
xmlns:app="http://schemas.android.com/apk/res-auto"
6161
android:layout_width="match_parent"
6262
android:layout_height="match_parent"
6363
app:srlEnableLoadMoreWhenContentNotFull="false">
64-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
64+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
6565
~~~
6666

6767

@@ -236,12 +236,12 @@ refreshlayout.setEnableAutoLoadMore(false);
236236
~~~
237237
XML属性
238238
~~~xml
239-
<com.scwang.smartrefresh.layout.SmartRefreshLayout
239+
<com.scwang.smart.refresh.layout.SmartRefreshLayout
240240
xmlns:app="http://schemas.android.com/apk/res-auto"
241241
android:layout_width="match_parent"
242242
android:layout_height="match_parent"
243243
app:srlEnableAutoLoadMore="false">
244-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
244+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
245245
~~~
246246

247247
## 8.还没调用 finishRefresh ,刷新就自动结束了?
Collapse file

‎art/md_property.md‎

Copy file name to clipboardExpand all lines: art/md_property.md
+5-5Lines changed: 5 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public class App extends Application {
107107
xml代码设置
108108
~~~xml
109109
<!-- 下面示例中的值等于默认值 -->
110-
<com.scwang.smartrefresh.layout.SmartRefreshLayout
110+
<com.scwang.smart.refresh.layout.SmartRefreshLayout
111111
android:id="@+id/refreshLayout"
112112
android:layout_width="match_parent"
113113
android:layout_height="match_parent"
@@ -223,7 +223,7 @@ public class RefreshActivity extends Activity {
223223
xml代码设置
224224
~~~xml
225225
<!-- 下面示例中的值等于默认值 -->
226-
<com.scwang.smartrefresh.layout.SmartRefreshLayout>
226+
<com.scwang.smart.refresh.layout.SmartRefreshLayout>
227227
<com.scwang.smartrefresh.layout.header.ClassicsHeader
228228
android:layout_width="match_parent"
229229
android:layout_height="wrap_content"
@@ -249,7 +249,7 @@ xml代码设置
249249
app:srlTextUpdate="@string/srl_header_update"
250250
app:srlTextSecondary="@string/srl_header_secondary"
251251
app:srlTextRefreshing="@string/srl_header_refreshing"/>
252-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
252+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
253253
~~~
254254

255255

@@ -304,7 +304,7 @@ public class RefreshActivity extends Activity {
304304
xml代码设置
305305
~~~xml
306306
<!-- 下面示例中的值等于默认值 -->
307-
<com.scwang.smartrefresh.layout.SmartRefreshLayout>
307+
<com.scwang.smart.refresh.layout.SmartRefreshLayout>
308308
<com.scwang.smartrefresh.layout.header.ClassicsFooter
309309
android:layout_width="match_parent"
310310
android:layout_height="wrap_content"
@@ -326,7 +326,7 @@ xml代码设置
326326
app:srlTextFinish="@string/srl_footer_finish"
327327
app:srlTextFailed="@string/srl_footer_failed"
328328
app:srlTextNothing="@string/srl_footer_nothing"/>
329-
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
329+
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
330330
~~~
331331

332332

Collapse file

‎art/md_update.md‎

Copy file name to clipboardExpand all lines: art/md_update.md
+5-2Lines changed: 5 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
## V 2.0.0 (开发中)
44
>添加:srlStyle 主题支持
55
>分包:layout = kernel + two-level + header-classics + header-radar + header-falsify + footer-classics + footer-ball
6-
>修改:包名 com.scwang.smartrefresh -> com.scwang.smart.refresh
7-
>回归:回归部分被去掉的API如:isRefreshing isLoading
6+
>修改:方法 OnMultiPurposeListener -> setOnMultiListener
7+
>修改:包名 com.scwang.smartrefresh -> com.scwang.smart.refresh
8+
>修改:类名 smartrefresh.layout.listener.OnMultiPurposeListener -> smart.refresh.layout.listener.OnMultiListener
9+
>修改:类名 smartrefresh.layout.listener.SimpleMultiPurposeListener -> smart.refresh.layout.simple.SimpleMultiListener
10+
>回归:回归部分被去掉的API如:isRefreshing isLoading
811
912
## V 1.1.0
1013

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.