├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── ic_delete.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_action_about.png │ │ │ │ ├── ic_action_good.png │ │ │ │ ├── ic_action_share.png │ │ │ │ ├── ic_action_discard.png │ │ │ │ ├── ic_action_favorite.png │ │ │ │ └── ic_action_important.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── item_list_app2.xml │ │ │ │ ├── activity_list.xml │ │ │ │ ├── activity_pull.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── header.xml │ │ │ │ └── item_list_app.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── yinglan │ │ │ └── demo │ │ │ ├── MainActivity.java │ │ │ ├── adapter │ │ │ ├── ListTextAdapter.java │ │ │ ├── ListLessAdapter.java │ │ │ └── ListAdapter.java │ │ │ ├── UnlimitHighActivity.java │ │ │ └── OrdinaryActivity.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── yinglan │ │ │ └── demo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── yinglan │ │ └── demo │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── ids.xml │ │ │ ├── dimens.xml │ │ │ ├── pull_refresh_strings.xml │ │ │ └── attrs.xml │ │ ├── drawable-hdpi │ │ │ ├── default_ptr_flip.png │ │ │ ├── indicator_arrow.png │ │ │ └── default_ptr_rotate.png │ │ ├── drawable-mdpi │ │ │ ├── default_ptr_flip.png │ │ │ ├── indicator_arrow.png │ │ │ └── default_ptr_rotate.png │ │ ├── drawable-xhdpi │ │ │ ├── indicator_arrow.png │ │ │ ├── default_ptr_flip.png │ │ │ └── default_ptr_rotate.png │ │ ├── values-zh │ │ │ └── pull_refresh_strings.xml │ │ ├── values-ja │ │ │ └── pull_refresh_strings.xml │ │ ├── values-ko │ │ │ └── pull_refresh_strings.xml │ │ ├── values-ar │ │ │ └── pull_refresh_strings.xml │ │ ├── values-he │ │ │ └── pull_refresh_strings.xml │ │ ├── values-iw │ │ │ └── pull_refresh_strings.xml │ │ ├── values-cs │ │ │ └── pull_refresh_strings.xml │ │ ├── values-es │ │ │ └── pull_refresh_strings.xml │ │ ├── values-fr │ │ │ └── pull_refresh_strings.xml │ │ ├── values-it │ │ │ └── pull_refresh_strings.xml │ │ ├── values-nl │ │ │ └── pull_refresh_strings.xml │ │ ├── values-pl │ │ │ └── pull_refresh_strings.xml │ │ ├── values-pt-rBR │ │ │ └── pull_refresh_strings.xml │ │ ├── values-pt │ │ │ └── pull_refresh_strings.xml │ │ ├── values-ru │ │ │ └── pull_refresh_strings.xml │ │ ├── values-de │ │ │ └── pull_refresh_strings.xml │ │ ├── values-ro │ │ │ └── pull_refresh_strings.xml │ │ ├── drawable │ │ │ ├── indicator_bg_top.xml │ │ │ └── indicator_bg_bottom.xml │ │ ├── values-fi │ │ │ └── pull_refresh_strings.xml │ │ ├── anim │ │ │ ├── slide_out_to_top.xml │ │ │ ├── slide_in_from_bottom.xml │ │ │ ├── slide_in_from_top.xml │ │ │ └── slide_out_to_bottom.xml │ │ └── layout │ │ │ ├── pull_to_refresh_header_horizontal.xml │ │ │ └── pull_to_refresh_header_vertical.xml │ │ ├── java │ │ └── com │ │ │ └── yinglan │ │ │ └── swiperefresh │ │ │ ├── SwipeMenuCreator.java │ │ │ ├── internal │ │ │ ├── Utils.java │ │ │ ├── EmptyViewMethodAccessor.java │ │ │ ├── ViewCompat.java │ │ │ ├── RotateLoadingLayout.java │ │ │ ├── FlipLoadingLayout.java │ │ │ └── IndicatorLayout.java │ │ │ ├── SwipeMenu.java │ │ │ ├── BaseSwipListAdapter.java │ │ │ ├── ILoadingLayout.java │ │ │ ├── LoadingLayoutProxy.java │ │ │ ├── SwipeMenuItem.java │ │ │ ├── SwipeMenuHighListView.java │ │ │ ├── PullToRefreshGridView.java │ │ │ ├── PullToRefreshExpandableListView.java │ │ │ ├── SwipeMenuView.java │ │ │ ├── extras │ │ │ ├── SoundPullEventListener.java │ │ │ └── PullToRefreshWebView2.java │ │ │ ├── PullToRefreshScrollView.java │ │ │ ├── PullToRefreshHorizontalScrollView.java │ │ │ ├── SwipeMenuAdapter.java │ │ │ ├── PullToRefreshWebView.java │ │ │ ├── OverscrollHelper.java │ │ │ ├── IPullToRefresh.java │ │ │ ├── SwipeMenuLayout.java │ │ │ ├── PullToRefreshSwipeListView.java │ │ │ └── PullToRefreshListView.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro ├── build.gradle └── LICENSE.txt ├── settings.gradle ├── show ├── demo.gif ├── app-debug.apk ├── Screenshot1.png ├── Screenshot2.png ├── Screenshot3.png ├── Screenshot4.png ├── Screenshot5.png ├── Screenshot6.png └── Screenshot7.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /show/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/demo.gif -------------------------------------------------------------------------------- /show/app-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/app-debug.apk -------------------------------------------------------------------------------- /show/Screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot1.png -------------------------------------------------------------------------------- /show/Screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot2.png -------------------------------------------------------------------------------- /show/Screenshot3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot3.png -------------------------------------------------------------------------------- /show/Screenshot4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot4.png -------------------------------------------------------------------------------- /show/Screenshot5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot5.png -------------------------------------------------------------------------------- /show/Screenshot6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot6.png -------------------------------------------------------------------------------- /show/Screenshot7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/show/Screenshot7.png -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Library 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_delete.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PullToRefresh&SwipeMenu_Library 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_action_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_action_good.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_action_share.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_discard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_action_discard.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_favorite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_action_favorite.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_important.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/app/src/main/res/drawable/ic_action_important.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/default_ptr_flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-hdpi/default_ptr_flip.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/indicator_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-hdpi/indicator_arrow.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/default_ptr_flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-mdpi/default_ptr_flip.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/indicator_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-mdpi/indicator_arrow.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/indicator_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-xhdpi/indicator_arrow.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-hdpi/default_ptr_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-hdpi/default_ptr_rotate.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-mdpi/default_ptr_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-mdpi/default_ptr_rotate.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/default_ptr_flip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-xhdpi/default_ptr_flip.png -------------------------------------------------------------------------------- /library/src/main/res/drawable-xhdpi/default_ptr_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yingLanNull/SwipeMenuAndRefresh/HEAD/library/src/main/res/drawable-xhdpi/default_ptr_rotate.png -------------------------------------------------------------------------------- /library/src/main/java/com/yinglan/swiperefresh/SwipeMenuCreator.java: -------------------------------------------------------------------------------- 1 | package com.yinglan.swiperefresh; 2 | 3 | 4 | public interface SwipeMenuCreator { 5 | 6 | void create(SwipeMenu menu); 7 | } 8 | -------------------------------------------------------------------------------- /library/src/main/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 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 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /library/src/main/res/values-zh/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 下拉刷新… 4 | 放开以刷新… 5 | 正在载入… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-ja/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 画面を引っ張って… 4 | 指を離して更新… 5 | 読み込み中… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-ko/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 당겨서 새로 고침… 4 | 놓아서 새로 고침… 5 | 로드 중… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-ar/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | اسحب للتحديث… 4 | اترك للتحديث… 5 | تحميل… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-he/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | משוך לרענון… 4 | שחרר לרענון… 5 | טוען… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-iw/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | משוך לרענון… 4 | שחרר לרענון… 5 | טוען… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-cs/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tažením aktualizujete… 4 | Uvolněním aktualizujete… 5 | Načítání… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-es/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tirar para actualizar… 4 | Soltar para actualizar… 5 | Cargando… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-fr/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tirez pour rafraîchir… 4 | Relâcher pour rafraîchir… 5 | Chargement… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-it/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tira per aggiornare… 4 | Rilascia per aggionare… 5 | Caricamento… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-nl/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Sleep om te vernieuwen… 4 | Loslaten om te vernieuwen… 5 | Laden… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-pl/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Pociągnij, aby odświeżyć… 4 | Puść, aby odświeżyć… 5 | Wczytywanie… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-pt-rBR/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Puxe para atualizar… 4 | Libere para atualizar… 5 | Carregando… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-pt/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Puxe para atualizar… 4 | Liberação para atualizar… 5 | A carregar… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-ru/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Потяните для обновления… 4 | Отпустите для обновления… 5 | Загрузка… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-de/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Ziehen zum Aktualisieren… 4 | Loslassen zum Aktualisieren… 5 | Laden… 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values-ro/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Trage pentru a reîmprospăta… 4 | Eliberează pentru a reîmprospăta… 5 | Încărcare… 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /library/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10dp 5 | 12dp 6 | 4dp 7 | 24dp 8 | 12dp 9 | 10 | -------------------------------------------------------------------------------- /library/src/main/java/com/yinglan/swiperefresh/internal/Utils.java: -------------------------------------------------------------------------------- 1 | package com.yinglan.swiperefresh.internal; 2 | 3 | import android.util.Log; 4 | 5 | public class Utils { 6 | 7 | static final String LOG_TAG = "PullToRefresh"; 8 | 9 | public static void warnDeprecation(String depreacted, String replacement) { 10 | Log.w(LOG_TAG, "You're using the deprecated " + depreacted + " attr, please switch over to " + replacement); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/com/yinglan/demo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.yinglan.demo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/item_list_app2.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/indicator_bg_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 17 | 18 | -------------------------------------------------------------------------------- /library/src/main/res/drawable/indicator_bg_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 17 | 18 | -------------------------------------------------------------------------------- /app/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/qcm/Environment/android_sdk_mac/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 | -------------------------------------------------------------------------------- /library/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/qcm/Environment/android_sdk_mac/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 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_list.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_pull.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 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 | 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 | -------------------------------------------------------------------------------- /library/src/main/res/values/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Pull to refresh… 5 | Release to refresh… 6 | Loading… 7 | 8 | 9 | @string/pull_to_refresh_pull_label 10 | @string/pull_to_refresh_release_label 11 | @string/pull_to_refresh_refreshing_label 12 | 13 | -------------------------------------------------------------------------------- /library/src/main/res/values-fi/pull_refresh_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Päivitä vetämällä alas… 5 | Päivitä vapauttamalla… 6 | Päivitetään… 7 | 8 | 9 | Päivitä vetämällä ylös… 10 | @string/pull_to_refresh_release_label 11 | @string/pull_to_refresh_refreshing_label 12 | 13 | -------------------------------------------------------------------------------- /library/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "24.0.1" 6 | 7 | defaultConfig { 8 | minSdkVersion 8 9 | targetSdkVersion 24 10 | versionCode 1 11 | versionName "1.0" 12 | 13 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 14 | 15 | } 16 | buildTypes { 17 | release { 18 | minifyEnabled false 19 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 20 | } 21 | } 22 | 23 | lintOptions { 24 | abortOnError false 25 | } 26 | } 27 | 28 | dependencies { 29 | compile fileTree(include: ['*.jar'], dir: 'libs') 30 | compile 'com.android.support:support-v4:24.0.0' 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/yinglan/demo/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.yinglan.demo; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.yinglan.demo", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /library/src/main/res/anim/slide_out_to_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | -------------------------------------------------------------------------------- /library/src/main/res/anim/slide_in_from_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | -------------------------------------------------------------------------------- /library/src/main/res/anim/slide_in_from_top.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | -------------------------------------------------------------------------------- /library/src/main/res/anim/slide_out_to_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion "24.0.1" 6 | defaultConfig { 7 | applicationId "com.yinglan.demo" 8 | minSdkVersion 9 9 | targetSdkVersion 24 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 25 | exclude group: 'com.android.support', module: 'support-annotations' 26 | }) 27 | compile 'com.android.support:appcompat-v7:24.0.0' 28 | testCompile 'junit:junit:4.12' 29 | compile project(':library') 30 | } 31 | -------------------------------------------------------------------------------- /library/src/main/java/com/yinglan/swiperefresh/SwipeMenu.java: -------------------------------------------------------------------------------- 1 | package com.yinglan.swiperefresh; 2 | 3 | import android.content.Context; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | 9 | public class SwipeMenu { 10 | 11 | private Context mContext; 12 | private List mItems; 13 | private int mViewType; 14 | 15 | public SwipeMenu(Context context) { 16 | mContext = context; 17 | mItems = new ArrayList(); 18 | } 19 | 20 | public Context getContext() { 21 | return mContext; 22 | } 23 | 24 | public void addMenuItem(SwipeMenuItem item) { 25 | mItems.add(item); 26 | } 27 | 28 | public void removeMenuItem(SwipeMenuItem item) { 29 | mItems.remove(item); 30 | } 31 | 32 | public List getMenuItems() { 33 | return mItems; 34 | } 35 | 36 | public SwipeMenuItem getMenuItem(int index) { 37 | return mItems.get(index); 38 | } 39 | 40 | public int getViewType() { 41 | return mViewType; 42 | } 43 | 44 | public void setViewType(int viewType) { 45 | this.mViewType = viewType; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 |