├── 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 payloads)方法,解决局部刷新导致加载更多的显示问题 3 | 4 | ### v1.2.3 (2017.08.02) 5 | * 解决GridLayoutManager.SpanSizeLookup被覆盖的问题 6 | 7 | ### v1.2.1 (2017.05.26) 8 | * 修复加载更多监听某些情况下不触发问题 9 | 10 | ### v1.2.0 (2017.04.26) 11 | * 修复加载更多动画显示出错问题 12 | 13 | ### v1.1.1 (2017.03.21) 14 | * 修复触发自动刷新时视图显示问题 15 | 16 | ### v1.1.0 (2017.03.13) 17 | * 初始化刷新&加载视图一些逻辑优化调整 18 | 19 | ### v1.0.0 (2017.02.13) 20 | * 解决HTBaseViewHolder初始化refreshView和loadMoreView为null时,引起显示错乱的问题 21 | * 代码结构重构,更新下拉刷新度机制 22 | 23 | ### v0.1.5 (2017.01.19) 24 | * 修复设置刷新视图背景色的问题 25 | 26 | ### v0.1.4 (2017.01.13) 27 | * 支持刷新过程中允许列表滚动(目前仅支持刷新视图置顶) 28 | 29 | ### v0.1.3 (2016.10.11) 30 | * 修复刷新立即结束时,刷新视图不能隐藏的问题 31 | 32 | ### v0.1.2 (2016.07.11) 33 | * 一些小优化 34 | 35 | ### v0.1.1 (2016.06.01) 36 | * update the version of RecyclerView to 23.2.0 37 | 38 | ### v0.1.0 (2016.04.20) 39 | * 支持各个方向的刷新和加载更多 40 | * 自定义刷新和加载更多的视图样式 41 | * 支持线性布局、GridView和瀑布流 42 | * 支持RecyclerView装饰器 -------------------------------------------------------------------------------- /demo/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | HTRefreshRecyclerView 3 | 4 | George 5 | Zubin 6 | Carlos 7 | Frank 8 | Charles 9 | Simon 10 | Fezra 11 | Henry 12 | Schuster 13 | Frank 14 | Charles 15 | Simon 16 | Fezra 17 | Henry 18 | Schuster 19 | Frank 20 | Charles 21 | Simon 22 | Fezra 23 | Henry 24 | Schuster 25 | Frank 26 | Charles 27 | Simon 28 | Fezra 29 | Henry 30 | Schuster 31 | 32 | 33 | -------------------------------------------------------------------------------- /demo/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion rootProject.compileSdkVersion 5 | buildToolsVersion rootProject.buildToolsVersion 6 | 7 | defaultConfig { 8 | applicationId "com.netease.demo.htrefreshrecyclerview" 9 | minSdkVersion rootProject.minSdkVersion 10 | targetSdkVersion rootProject.targetSdkVersion 11 | versionCode 1 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | buildToolsVersion '25.0.0' 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | compile 'com.nineoldandroids:library:2.4.0' 25 | // compile project(':htrefreshrecyclerview') 26 | compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" 27 | compile "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion" 28 | compile 'com.netease.hearttouch:ht-refreshrecyclerview:1.2.3' 29 | } 30 | 31 | -------------------------------------------------------------------------------- /htrefreshrecyclerview/build.gradle: -------------------------------------------------------------------------------- 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 | apply plugin: 'com.android.library' 6 | 7 | android { 8 | compileSdkVersion rootProject.compileSdkVersion 9 | buildToolsVersion rootProject.buildToolsVersion 10 | 11 | defaultConfig { 12 | vectorDrawables.useSupportLibrary = true 13 | minSdkVersion rootProject.minSdkVersion 14 | targetSdkVersion rootProject.targetSdkVersion 15 | versionCode 1 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | compile fileTree(dir: 'libs', include: ['*.jar']) 27 | testCompile "junit:junit:$rootProject.junitVersion" 28 | provided "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" 29 | provided "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion" 30 | } 31 | 32 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Netease Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /demo/src/main/res/layout/horizontal_refresh_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /demo/src/main/res/layout/vertiacl_refresh_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /demo/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /demo/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 |