├── sample ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ └── dog.jpg │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── menu │ │ │ ├── custom_refresh.xml │ │ │ └── main.xml │ │ └── layout │ │ │ ├── activity_recyclerview.xml │ │ │ ├── adapter_list.xml │ │ │ ├── activity_custom_refresh_anim.xml │ │ │ ├── activity_main.xml │ │ │ └── activity_nestedscrollview.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── xrefreshlayout │ │ └── sample │ │ ├── MainActivity.java │ │ ├── NestedScrollViewActivity.java │ │ ├── CustomRefreshAnimActivity.java │ │ └── RecyclerViewActivity.java ├── proguard-rules.pro └── build.gradle ├── xrefreshlayout ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ └── strings.xml │ │ ├── drawable-hdpi │ │ │ ├── xrl_arrow_up.png │ │ │ ├── xrl_arrow_down.png │ │ │ ├── xrl_loading_01.png │ │ │ ├── xrl_loading_02.png │ │ │ ├── xrl_loading_03.png │ │ │ ├── xrl_loading_04.png │ │ │ ├── xrl_loading_05.png │ │ │ ├── xrl_loading_06.png │ │ │ ├── xrl_loading_07.png │ │ │ ├── xrl_loading_08.png │ │ │ ├── xrl_loading_09.png │ │ │ ├── xrl_loading_10.png │ │ │ ├── xrl_loading_11.png │ │ │ └── xrl_loading_12.png │ │ ├── layout │ │ │ ├── xrl_progress_footer.xml │ │ │ ├── xrl_progress_header.xml │ │ │ ├── xrl_default_header.xml │ │ │ └── xrl_default_footer.xml │ │ ├── menu │ │ │ └── main.xml │ │ └── drawable │ │ │ └── xrl_default_progress.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── lxj │ │ └── xrefreshlayout │ │ ├── util │ │ ├── L.java │ │ └── DensityUtil.java │ │ ├── loadinglayout │ │ ├── ILoadingLayout.java │ │ ├── CircleLoadingView.java │ │ ├── DefaultLoadingLayout.java │ │ └── CircleLoadingLayout.java │ │ └── XRefreshLayout.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── Screenshot ├── grid.gif ├── linear.gif ├── staggered.gif ├── custom_anim.gif └── nestedscroll.gif ├── .idea ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── libraries │ ├── javax_inject_1.xml │ ├── jsr305_2_0_1.xml │ ├── javawriter_2_1_1.xml │ ├── hamcrest_library_1_3.xml │ ├── hamcrest_integration_1_3.xml │ ├── javax_annotation_api_1_2.xml │ ├── support_v4_25_3_0.xml │ ├── junit_4_12.xml │ ├── support_annotations_25_3_0.xml │ ├── hamcrest_core_1_3.xml │ ├── rules_0_5.xml │ ├── runner_0_5.xml │ ├── appcompat_v7_25_3_0.xml │ ├── support_compat_25_3_0.xml │ ├── espresso_core_2_2_2.xml │ ├── recyclerview_v7_25_0_0.xml │ ├── support_core_ui_25_3_0.xml │ ├── support_fragment_25_3_0.xml │ ├── support_core_utils_25_3_0.xml │ ├── butterknife_8_5_1.xml │ ├── butterknife_annotations_8_5_1.xml │ ├── support_media_compat_25_3_0.xml │ ├── support_vector_drawable_25_3_0.xml │ ├── animated_vector_drawable_25_3_0.xml │ ├── espresso_idling_resource_2_2_2.xml │ └── exposed_instrumentation_api_publish_0_5.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml ├── modules.xml └── misc.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── LICENSE ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /sample/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /xrefreshlayout/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':sample', ':xrefreshlayout' 2 | -------------------------------------------------------------------------------- /Screenshot/grid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/Screenshot/grid.gif -------------------------------------------------------------------------------- /Screenshot/linear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/Screenshot/linear.gif -------------------------------------------------------------------------------- /Screenshot/staggered.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/Screenshot/staggered.gif -------------------------------------------------------------------------------- /Screenshot/custom_anim.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/Screenshot/custom_anim.gif -------------------------------------------------------------------------------- /Screenshot/nestedscroll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/Screenshot/nestedscroll.gif -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /sample/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | XRefreshLayout 3 | 4 | -------------------------------------------------------------------------------- /sample/src/main/res/drawable/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/drawable/dog.jpg -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | XRefreshLayout 3 | 4 | -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_arrow_up.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_arrow_down.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_01.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_02.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_03.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_04.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_05.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_06.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_07.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_08.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_09.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_10.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_11.png -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/junixapp/XRefreshLayout/HEAD/xrefreshlayout/src/main/res/drawable-hdpi/xrl_loading_12.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sample/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Apr 03 20:17: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-4.6-all.zip 7 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/javax_inject_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/jsr305_2_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/javawriter_2_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_library_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_integration_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/javax_annotation_api_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/libraries/support_v4_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sample/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/custom_refresh.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_recyclerview.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/java/com/lxj/xrefreshlayout/util/L.java: -------------------------------------------------------------------------------- 1 | package com.lxj.xrefreshlayout.util; 2 | 3 | import android.util.Log; 4 | 5 | /** 6 | * Created by dance on 2017/4/2. 7 | */ 8 | 9 | public class L { 10 | private static final String TAG = "XRefreshLayout"; 11 | public static boolean isDebug = true; 12 | public static void d(String msg){ 13 | if(isDebug){ 14 | Log.d(TAG,msg); 15 | } 16 | } 17 | public static void e(String msg){ 18 | if(isDebug){ 19 | Log.e(TAG,msg); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.idea/libraries/hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/rules_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/runner_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/appcompat_v7_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/layout/xrl_progress_footer.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/support_compat_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/layout/xrl_progress_header.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/libraries/espresso_core_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/recyclerview_v7_25_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_ui_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright li-xiaojun 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /.idea/libraries/support_fragment_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_utils_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/butterknife_8_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/butterknife_annotations_8_5_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/libraries/support_media_compat_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/support_vector_drawable_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the ART/Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | out/ 15 | 16 | # Gradle files 17 | .gradle/ 18 | build/ 19 | 20 | # Local configuration file (sdk path, etc) 21 | local.properties 22 | 23 | # Proguard folder generated by Eclipse 24 | proguard/ 25 | 26 | # Log Files 27 | *.log 28 | 29 | # Android Studio Navigation editor temp files 30 | .navigation/ 31 | 32 | # Android Studio captures folder 33 | captures/ 34 | 35 | # Intellij 36 | *.iml 37 | .idea/workspace.xml 38 | 39 | # Keystore files 40 | *.jks 41 | .idea 42 | bintray.sh -------------------------------------------------------------------------------- /.idea/libraries/animated_vector_drawable_25_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/libraries/espresso_idling_resource_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sample/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | 19 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/adapter_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 16 | 17 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 14 | 19 | -------------------------------------------------------------------------------- /.idea/libraries/exposed_instrumentation_api_publish_0_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sample/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 F:\androidsdk/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 | -------------------------------------------------------------------------------- /xrefreshlayout/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 F:\androidsdk/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 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/java/com/lxj/xrefreshlayout/util/DensityUtil.java: -------------------------------------------------------------------------------- 1 | package com.lxj.xrefreshlayout.util; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by dance on 2017/4/2. 7 | */ 8 | 9 | public class DensityUtil { 10 | /** 11 | * 根据手机的分辨率从 dp 的单位 转成为 px(像素) 12 | */ 13 | public static int dip2px(Context context, float dpValue) { 14 | final float scale = context.getResources().getDisplayMetrics().density; 15 | return (int) (dpValue * scale + 0.5f); 16 | } 17 | 18 | /** 19 | * 根据手机的分辨率从 px(像素) 的单位 转成为 dp 20 | */ 21 | public static int px2dip(Context context, float pxValue) { 22 | final float scale = context.getResources().getDisplayMetrics().density; 23 | return (int) (pxValue / scale + 0.5f); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /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 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | android.enableAapt2=false -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /xrefreshlayout/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'com.novoda.bintray-release' 3 | 4 | android { 5 | compileSdkVersion 28 6 | 7 | defaultConfig { 8 | minSdkVersion 15 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | 14 | } 15 | buildTypes { 16 | release { 17 | minifyEnabled false 18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 19 | } 20 | } 21 | } 22 | 23 | dependencies { 24 | implementation fileTree(dir: 'libs', include: ['*.jar']) 25 | implementation 'com.android.support:appcompat-v7:28.0.0' 26 | } 27 | 28 | publish { 29 | userOrg = 'li-xiaojun' 30 | groupId = 'com.lxj' 31 | artifactId = 'xrefreshlayout' 32 | publishVersion = '0.0.1' 33 | repoName = 'jrepo' 34 | desc = 'A refresh layout(无侵入下拉刷新和加载布局), can refresh RecyclerView for all LayoutManager, NestedScrollView。' 35 | website = 'https://github.com/li-xiaojun/XRefreshLayout' 36 | } 37 | 38 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/java/com/lxj/xrefreshlayout/loadinglayout/ILoadingLayout.java: -------------------------------------------------------------------------------- 1 | package com.lxj.xrefreshlayout.loadinglayout; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.view.ViewGroup; 6 | 7 | /** 8 | * Created by dance on 2017/4/2. 9 | */ 10 | 11 | public interface ILoadingLayout { 12 | /** 13 | * make your loading view! 14 | * @return 15 | */ 16 | View createLoadingHeader(Context context,ViewGroup parent); 17 | View createLoadingFooter(Context context,ViewGroup parent); 18 | 19 | /** 20 | * init your views or reset them. 21 | */ 22 | void initAndResetHeader(); 23 | void initAndResetFooter(); 24 | 25 | /** 26 | * called when you are pulling the XRefreshLayout, you 27 | * can make your pulling animation! 28 | */ 29 | void onPullHeader(float percent); 30 | void onPullFooter(float percent); 31 | 32 | /** 33 | * called when release a view form pull state! 34 | */ 35 | void onHeaderRefreshing(); 36 | void onFooterRefreshing(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /sample/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.xrefreshlayout.sample" 7 | minSdkVersion 15 8 | targetSdkVersion 28 9 | versionCode 1 10 | versionName "1.0" 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | packagingOptions { 19 | exclude 'META-INF/androidx.core_core.version' 20 | exclude 'META-INF/proguard/androidx-annotations.pro' 21 | exclude 'META-INF/androidx.versionedparcelable_versionedparcelable.version' 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(include: ['*.jar'], dir: 'libs') 27 | implementation 'com.android.support:appcompat-v7:28.0.0' 28 | implementation 'com.android.support:recyclerview-v7:28.0.0' 29 | implementation project(':xrefreshlayout') 30 | implementation 'com.lxj:easyadapter:1.0.0' 31 | 32 | } 33 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_custom_refresh_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /sample/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /xrefreshlayout/src/main/res/drawable/xrl_default_progress.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /sample/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 |