pull-to-refresh layout implements NestedScrollingParent NestedScrollingChild

Min SDK   8
Latest Commit   2017-09-20 14:52:22
License   MIT

Github   https://github.com/anzewei/NestRefreshLayout

         

使用APP客户端扫描二维码运行Demo


...

anzewei




QQ: 790786918

         

类似的还有....
Android-PullToRefreshRecyclerView A RecyclerView library for Android which support pull-to-refresh ,auto-load-more and add header.
sticky-headers-recyclerview Sticky Headers decorator for Android s RecyclerView
async-expandable-list GitHub - Ericliu001/async-expandable-list
README

README.md

NestRefreshLayout

Demo Apk

DOWNLOAD

#Usage

##Step 1

  • Add these lines to your build.gradle
compile 'cn.appsdream.nestrefresh:refreshLayout:0.2'

##Step 2

NestRefreshLayout loader = new NestRefreshLayout(mView);
loader.setRefreshEnable(true)
loader.setLoadMoreEnable(true)

OR

<cn.appsdream.nestrefresh.normalstyle.NestRefreshLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/can_content_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/holo_blue_light"
        android:cacheColorHint="@android:color/transparent"
        android:clipToPadding="false"
        android:scrollingCache="false"/>
</cn.appsdream.nestrefresh.normalstyle.NestRefreshLayout>

##Step 2

-after get data

loader.onLoadFinished();
loader.onLoadAll();

#Customer Style

Theme

  <style name="my_loader_style">
        <item name="headerNestLayout">@layout/refresh_layout</item>
        <item name="footerNestLayout">@layout/more_layout</item>
  </style>

Add to theme

  <item name"nestRefreshLayoutStyle">@style/my_loader_style</item>

OR ##Add attr

<cn.appsdream.nestrefresh.normalstyle.NestRefreshLayout
    app:headerNestLayout="@layout/layout_header"
    xmlns:app="http://schemas.android.com/apk/res-auto">
</cn.appsdream.nestrefresh.normalstyle.NestRefreshLayout>

#Notice You can customer Header and Footer only implement LoaderDecor setState with 3 status STATE_NORMAL
STATE_READY
STATE_REFRESHING

and scroll will call function scrollRate More info NestFooter NestHeader