SwipeRefreshLayout实现各种超炫的下拉刷新酷,适合初学者使用

 

SwipeRefreshLayout实现各种超炫的下拉刷新酷_JAVA

 

 

使用说明:

1Gradle
compile 'com.cjj.materialrefeshlayout:library:1.3.0'
2xml

<com.cjj.MaterialRefreshLayout

    xmlns:android="http://schemas.android.com/apk/res/android"

    xmlns:app="http://schemas.android.com/apk/res-auto"

    android:id="@+id/refresh"

    android:layout_width="match_parent"

    android:layout_height="match_parent"

    >

      <...ListView or GridView or RecyclerView or ScrollView and more...>

 

</com.cjj.MaterialRefreshLayout>

 

3xml

 

materialRefreshLayout = (MaterialRefreshLayout) findViewById(R.id...);

 materialRefreshLayout.setMaterialRefreshListener(new MaterialRefreshListener() {

      @Override

      public void onRefresh(final MaterialRefreshLayout materialRefreshLayout) {

          //refreshing...

      }

       @Override

       public void onRefreshLoadMore(MaterialRefreshLayout materialRefreshLayout) {

          //load more refreshing...

       }

  }

// refresh complete

materialRefreshLayout.finishRefresh();

 

// load more refresh complete

 materialRefreshLayout.finishRefreshLoadMore();

 

 

源码下载

http://pan.baidu.com/s/1nv6F8Hb

 


推荐个通讯录源码

来源 https://github.com/WX-JIN/JContact

SwipeRefreshLayout实现各种超炫的下拉刷新酷_JAVA_02

SwipeRefreshLayout实现各种超炫的下拉刷新酷_JAVA_03

源码下载:http://pan.baidu.com/s/1eR7Z5XS

https://mp.weixin.qq.com/s/zVrW1IdHnnB8lZEaMlyRdg