├── CONTRIBUTING.md
├── demo
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── refresh_loading.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ │ ├── styles.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── strings.xml
│ │ │ ├── drawable
│ │ │ │ ├── shape_loading_left_dot.xml
│ │ │ │ ├── shape_loading_right_dot.xml
│ │ │ │ └── refresh_loading.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── layout
│ │ │ │ ├── vertical_item.xml
│ │ │ │ ├── horizontal_item.xml
│ │ │ │ ├── horizontal_refresh_view.xml
│ │ │ │ ├── vertiacl_refresh_view.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── activity_vertaical_refresh.xml
│ │ │ │ ├── activity_vertical_up_refresh.xml
│ │ │ │ ├── activity_horizontal_left.xml
│ │ │ │ ├── activity_horizontal_right.xml
│ │ │ │ ├── vertiacl_load_more_view.xml
│ │ │ │ └── horizontal_load_more_view.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── netease
│ │ │ │ └── demo
│ │ │ │ ├── MyApplication.java
│ │ │ │ ├── MyAdapter.java
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── DividerItemDecoration.java
│ │ │ │ ├── refreshstyle
│ │ │ │ ├── DotStyleHorizontalLeftRefreshViewHolder.java
│ │ │ │ ├── DotStyleVerticalUpRefreshViewHolder.java
│ │ │ │ ├── DotStyleHorizontalRightRefreshViewHolder.java
│ │ │ │ └── DotStyleVerticalDownRefreshViewHolder.java
│ │ │ │ └── refreshactivity
│ │ │ │ ├── VerticalUpRefreshActivity.java
│ │ │ │ ├── HorizontalLeftRefreshActivity.java
│ │ │ │ ├── HorizontalRightRefreshActivity.java
│ │ │ │ └── VerticalDownRefreshActivity.java
│ │ └── AndroidManifest.xml
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── netease
│ │ └── stone
│ │ └── myswiperefreshrecyclerview
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── htrefreshrecyclerview
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── refresh_loading_default.png
│ │ │ │ └── refresh_down_arrow_default.png
│ │ │ ├── drawable
│ │ │ │ ├── ht_left_arrow_default.xml
│ │ │ │ ├── ht_right_arrow_default.xml
│ │ │ │ ├── ht_up_arrow_default.xml
│ │ │ │ └── ht_refresh_loading_default.xml
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── attrs.xml
│ │ │ └── layout
│ │ │ │ ├── ht_view_horizontal_load_more_default.xml
│ │ │ │ ├── ht_view_vertical_refresh_default.xml
│ │ │ │ ├── ht_view_vertical_load_more_default.xml
│ │ │ │ └── ht_view_horizontal_refresh_default.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── netease
│ │ │ └── hearttouch
│ │ │ └── htrefreshrecyclerview
│ │ │ ├── HTRefreshListener.java
│ │ │ ├── HTLoadMoreListener.java
│ │ │ ├── HTRecyclerViewDragListener.java
│ │ │ ├── base
│ │ │ ├── HTOrientation.java
│ │ │ ├── HTItemDecoration.java
│ │ │ ├── HTBaseViewHolder.java
│ │ │ ├── HTRefreshRecyclerViewInterface.java
│ │ │ ├── HTViewHolderTracker.java
│ │ │ └── HTWrapperAdapter.java
│ │ │ ├── viewimpl
│ │ │ ├── HTVerticalRecyclerViewImpl.java
│ │ │ ├── HTHorizontalRecyclerViewImpl.java
│ │ │ ├── HTVerticalUpRecyclerViewImpl.java
│ │ │ ├── HTVerticalDownRecyclerViewImpl.java
│ │ │ ├── HTHorizontalLeftRecyclerViewImpl.java
│ │ │ ├── HTHorizontalRightRecyclerViewImpl.java
│ │ │ ├── HTDefaultVerticalRefreshViewHolder.java
│ │ │ ├── HTDefaultHorizontalRefreshViewHolder.java
│ │ │ └── HTBaseRecyclerViewImpl.java
│ │ │ ├── utils
│ │ │ └── Utils.java
│ │ │ └── HTRefreshRecyclerView.java
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── netease
│ │ │ └── hearttouch
│ │ │ └── htrefreshrecyclerview
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── netease
│ │ └── hearttouch
│ │ └── htrefreshrecyclerview
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gif
├── Untitled1.gif
└── Untitled2.gif
├── .gitignore
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── gradlew.bat
├── Guide.md
└── gradlew
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':demo', ':htrefreshrecyclerview'
2 |
--------------------------------------------------------------------------------
/gif/Untitled1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/gif/Untitled1.gif
--------------------------------------------------------------------------------
/gif/Untitled2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/gif/Untitled2.gif
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
2 | .gradle
3 | /local.properties
4 | .DS_Store
5 | /build
6 | /captures
7 | *.iml
8 |
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/demo/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/demo/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/demo/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/demo/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/demo/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/demo/src/main/res/mipmap-xhdpi/refresh_loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/demo/src/main/res/mipmap-xhdpi/refresh_loading.png
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/mipmap-hdpi/refresh_loading_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/htrefreshrecyclerview/src/main/res/mipmap-hdpi/refresh_loading_default.png
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/mipmap-hdpi/refresh_down_arrow_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/NEYouFan/ht-refreshrecyclerview/HEAD/htrefreshrecyclerview/src/main/res/mipmap-hdpi/refresh_down_arrow_default.png
--------------------------------------------------------------------------------
/demo/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun Mar 12 22:44:01 CST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/demo/src/main/res/drawable/shape_loading_left_dot.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/src/main/res/drawable/shape_loading_right_dot.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/src/main/java/com/netease/demo/MyApplication.java:
--------------------------------------------------------------------------------
1 | package com.netease.demo;
2 |
3 | import android.app.Application;
4 |
5 | /**
6 | * Created by stone on 16/2/15.
7 | */
8 | public class MyApplication extends Application {
9 |
10 | @Override
11 | public void onCreate() {
12 | super.onCreate();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/demo/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/java/com/netease/hearttouch/htrefreshrecyclerview/HTRefreshListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This source code is licensed under the MIT-style license found in the
3 | * LICENSE file in the root directory of this source tree.
4 | */
5 |
6 | package com.netease.hearttouch.htrefreshrecyclerview;
7 |
8 | /**
9 | * 控件的刷新监听事件回调接口,如果用户希望控件支持刷新功能需要实现该接口
10 | */
11 | public interface HTRefreshListener {
12 |
13 | void onRefresh();
14 | }
15 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/java/com/netease/hearttouch/htrefreshrecyclerview/HTLoadMoreListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This source code is licensed under the MIT-style license found in the
3 | * LICENSE file in the root directory of this source tree.
4 | */
5 |
6 | package com.netease.hearttouch.htrefreshrecyclerview;
7 |
8 | /**
9 | * 控件的加载更多监听事件回调接口,如果用户希望控件支持刷新功能需要实现该接口
10 | */
11 | public interface HTLoadMoreListener {
12 |
13 | void onLoadMore();
14 | }
15 |
--------------------------------------------------------------------------------
/demo/src/main/res/drawable/refresh_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/drawable/ht_left_arrow_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/drawable/ht_right_arrow_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/drawable/ht_up_arrow_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/demo/src/androidTest/java/com/netease/stone/myswiperefreshrecyclerview/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.netease.stone.myswiperefreshrecyclerview;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/drawable/ht_refresh_loading_default.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 | HTRefreshRecyclerView
7 | 拉动刷新
8 | 释放刷新
9 | 正在刷新
10 | 刷新完成
11 | 没有更多了
12 | 正在加载
13 |
14 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/test/java/com/netease/hearttouch/htrefreshrecyclerview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This source code is licensed under the MIT-style license found in the
3 | * LICENSE file in the root directory of this source tree.
4 | */
5 |
6 | package com.netease.hearttouch.htrefreshrecyclerview;
7 |
8 | import org.junit.Test;
9 |
10 | import static org.junit.Assert.assertEquals;
11 |
12 | /**
13 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
14 | */
15 | public class ExampleUnitTest {
16 | @Test
17 | public void addition_isCorrect() throws Exception {
18 | assertEquals(4, 2 + 2);
19 | }
20 | }
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/androidTest/java/com/netease/hearttouch/htrefreshrecyclerview/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This source code is licensed under the MIT-style license found in the
3 | * LICENSE file in the root directory of this source tree.
4 | */
5 |
6 | package com.netease.hearttouch.htrefreshrecyclerview;
7 |
8 | import android.app.Application;
9 | import android.test.ApplicationTestCase;
10 |
11 | /**
12 | * Testing Fundamentals
13 | */
14 | public class ApplicationTest extends ApplicationTestCase {
15 | public ApplicationTest() {
16 | super(Application.class);
17 | }
18 | }
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/java/com/netease/hearttouch/htrefreshrecyclerview/HTRecyclerViewDragListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This source code is licensed under the MIT-style license found in the
3 | * LICENSE file in the root directory of this source tree.
4 | */
5 |
6 | package com.netease.hearttouch.htrefreshrecyclerview;
7 |
8 | /**
9 | * 控件在刷新方向上的拖拽事件监听
10 | */
11 | public interface HTRecyclerViewDragListener {
12 |
13 | /**
14 | * 拖拽列表滚动事件监听,是基于RecyclerView.OnScrollListener()事件;
15 | * 如果实现该接口,不用再重复添加RecyclerView.OnScrollListener()事件来监听列表拖拽事件
16 | */
17 | void onRecyclerViewScroll();
18 |
19 | /** 刷新视图位置准备开始变化 */
20 | void onRefreshViewPrepareToMove();
21 | }
22 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | 60dp
8 | 60dp
9 | 5dp
10 | 5dp
11 | 20dp
12 | 25dp
13 | 25dp
14 | 12sp
15 |
16 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/java/com/netease/hearttouch/htrefreshrecyclerview/base/HTOrientation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This source code is licensed under the MIT-style license found in the
3 | * LICENSE file in the root directory of this source tree.
4 | *
5 | */
6 |
7 | package com.netease.hearttouch.htrefreshrecyclerview.base;
8 |
9 | /**
10 | * Created by fgx on 2017/2/10.
11 | */
12 |
13 | public interface HTOrientation {
14 | /**
15 | * 垂直向上
16 | */
17 | int VERTICAL_UP = 0;
18 | /**
19 | * 垂直向下
20 | */
21 | int VERTICAL_DOWN = 1;
22 | /**
23 | * 水平向左
24 | */
25 | int HORIZONTAL_LEFT = 2;
26 | /**
27 | * 水平向右
28 | */
29 | int HORIZONTAL_RIGHT = 3;
30 | }
31 |
--------------------------------------------------------------------------------
/demo/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/stone/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/demo/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 7dp
4 | 24dp
5 | 8dp
6 | 18dp
7 | 2dp
8 | 40dp
9 | 35dp
10 | 10dp
11 |
12 | 16dp
13 | 16dp
14 |
--------------------------------------------------------------------------------
/demo/src/main/res/layout/vertical_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
--------------------------------------------------------------------------------
/demo/src/main/res/layout/horizontal_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
18 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/stone/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/htrefreshrecyclerview/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 | org.gradle.daemon=true
20 | org.gradle.configureondemand=true
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ### v1.2.4 (2018.09.9)
2 | * 复写RecyclerView.Adapter的onBindViewHolder(RecyclerView.ViewHolder holder, int position, List