Awesome Open Source
Awesome Open Source

SuperSwipeRefreshLayout

Download API License Blog QQGroup

SuperSwipeRefreshLayout是在SwipeRefreshLayout的基础之上扩展修改,让其支持上拉刷新,基本用法与SwipeRefreshLayout一致。

Image

引入

Maven:

<dependency>
  <groupId>com.king.view</groupId>
  <artifactId>superswiperefreshlayout</artifactId>
  <version>1.1.0</version>
  <type>pom</type>
</dependency>

Gradle:

compile 'com.king.view:superswiperefreshlayout:1.1.0'

Lvy:

<dependency org='com.king.view' name='superswiperefreshlayout' rev='1.1.0'>
  <artifact name='$AID' ext='pom'></artifact>
</dependency>
如果Gradle出现compile失败的情况,可以在Project的build.gradle里面添加如下:(也可以使用上面的GitPack来complie)
allprojects {
    repositories {
        maven { url 'https://dl.bintray.com/jenly/maven' }
    }
}

使用布局示例:

    <com.king.view.superswiperefreshlayout.SuperSwipeRefreshLayout
        android:id="@+id/superSwipeRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:direction="both">

        <android.support.v7.view.RecyclerView
            android:id="@+id/recyclerView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </com.king.view.superswiperefreshlayout.SuperSwipeRefreshLayout>

代码设置支持滑动刷新方向:

  superSwipeRefreshLayout.setDirection(SuperSwipeRefreshLayout.Direction.TOP);
 
  superSwipeRefreshLayout.setDirection(SuperSwipeRefreshLayout.Direction.BOTTOM);
  
  superSwipeRefreshLayout.setDirection(SuperSwipeRefreshLayout.Direction.BOTH);

更多使用详情请查看demo示例。

赞赏

如果您喜欢SuperSwipeRefreshLayout,或感觉SuperSwipeRefreshLayout帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢😃

您也可以扫描下面的二维码,请作者喝杯咖啡 ☕️

关于我

Name: Jenly

Email: jenly1314#gmail.com / jenly1314#vip.qq.com

CSDN: jenly121

Github: jenly1314

加入QQ群: 20867961


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Java (710,233
Swipe (300
Pull To Refresh (152
Refresh (144
Related Projects