All Projects → lovejjfg → PowerRefresh

lovejjfg / PowerRefresh

Licence: other
Support nested scroll for refresh and load more.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to PowerRefresh

SwipeRefreshPlus
参考swiperefreshlayout添加下拉加载更多
Stars: ✭ 24 (-62.5%)
Mutual labels:  loadmore, refreshlayout
ZRefreshLayout
一个可以全局随意配置头部的下拉刷新与上拉加载库;
Stars: ✭ 30 (-53.12%)
Mutual labels:  loadmore, refreshlayout
goRefresh
让下拉刷新炫酷起来~轻松接入lottie动画,支持listview recyclerview scrollerview webview 。同时支持listview和recyclerview上拉加载
Stars: ✭ 24 (-62.5%)
Mutual labels:  loadmore, refreshlayout
Springview
🔥 A custom view pull to refresh,support ScrollView,ListView,RecyclerView,WebView and all another views, easy to use
Stars: ✭ 1,936 (+2925%)
Mutual labels:  refreshlayout
Shswiperefreshlayout
Android 升级版 SwipeRefreshLayout,支持RecyclerView、ScrollView等大部分组件,下拉刷新(Refresh)和上拉加载(Loadmore),支持自定义HeaderView和FooterView
Stars: ✭ 236 (+268.75%)
Mutual labels:  refreshlayout
Android-RecyclerView-Loadmore
RecyclerView Loadmore and Swipe refresh for LinearLayout GridLayout and StaggeredLayout
Stars: ✭ 27 (-57.81%)
Mutual labels:  loadmore
vuejs-loadmore
A pull-down refresh and pull-up loadmore scroll component for Vue.js. Vue上拉加载下拉刷新组件
Stars: ✭ 62 (-3.12%)
Mutual labels:  loadmore
React Native Mjrefresh
基于ios MJRefresh https://github.com/CoderMJLee/MJRefresh 开发的插件,可提供自定义的弹性刷新
Stars: ✭ 140 (+118.75%)
Mutual labels:  refreshlayout
DraggableTreeView
TreeView with drag and drop (n-th level)
Stars: ✭ 95 (+48.44%)
Mutual labels:  nestedscrollview
CeilingLayout
CeilingLayout用来控制子View的吸顶联滑,理论上支持实现了NestedScrollingChild的联滑控件,如NestedScrollView、RecyclerView、SmartRefreshLayout等;只需要在xml里配置需要吸顶子View的位置索引就能自动实现吸顶联滑效果。
Stars: ✭ 26 (-59.37%)
Mutual labels:  nestedscrollview
PullToRefresh
下拉刷新库可自定义刷新加载
Stars: ✭ 111 (+73.44%)
Mutual labels:  loadmore
flutter appbar
根据动画写一个带背景图片的TabBar,TabBar分隔符,NestedScrollView+TabBar折叠头部
Stars: ✭ 50 (-21.87%)
Mutual labels:  nestedscrollview
React Native Smartrefreshlayout
基于android SmartRefreshLayout https://github.com/scwang90/SmartRefreshLayout 开发的插件,可提供类似ios的弹性刷新
Stars: ✭ 240 (+275%)
Mutual labels:  refreshlayout
WX MultiTabList
微信小程序,多个Tab列表的上下拉刷新方案
Stars: ✭ 25 (-60.94%)
Mutual labels:  loadmore
Krefreshlayout
强大的下拉刷新库,定制任意Header。比官方SwipRefrehLayout处理更加友好(Kotlin、Java双版本)
Stars: ✭ 217 (+239.06%)
Mutual labels:  refreshlayout
Swiperecyclerview
🍈 RecyclerView侧滑菜单,Item拖拽,滑动删除Item,自动加载更多,HeaderView,FooterView,Item分组黏贴。
Stars: ✭ 5,174 (+7984.38%)
Mutual labels:  loadmore
Smartswipe
An android library to make swipe more easier and more powerful. Android各种侧滑,有这一个就够了
Stars: ✭ 1,911 (+2885.94%)
Mutual labels:  refreshlayout
Multi-SwipeToRefreshLayout
多方向支持刷新view通用布局
Stars: ✭ 17 (-73.44%)
Mutual labels:  refreshlayout
Placeholderview
This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
Stars: ✭ 2,104 (+3187.5%)
Mutual labels:  loadmore
react-native-nested-scroll-view
react-native wrapper for android NestedScrollView
Stars: ✭ 77 (+20.31%)
Mutual labels:  nestedscrollview

PowerReresh

This library support nested scroll for refresh and load more,so you can use it with CoordinatorLayout and AppBarLayout and so no.You can design your self header or footer easily. 中文文档

screen

Download Android Arsenal

Add Header

   CircleHeaderView header = new CircleHeaderView(getContext());
    mRefreshLayout.addHeader(header);

Add footer

FootView footView = new FootView(getContext());
mRefreshLayout.addFooter(header);

Callback

you should make Header impl HeaderListener,so you can know the refresh state.and to Footer with FooterListener.

mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
    @Override
    public void onRefresh() {
		//doRefresh
    }

    @Override
    public void onLoadMore() {
      //doLoadmore
    }
});

Layout

<com.lovejjfg.powerrefresh.PowerRefreshLayout
android:id="@+id/refresh_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler"
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:context="com.lovejjfg.demo.MainActivity">
    </android.support.v7.widget.RecyclerView>

</com.lovejjfg.powerrefresh.PowerRefreshLayout>

Tips

  • If you want to refresh when first init call setAutoRefresh(true) on MainThread.

  • If you don't want to add any Footer,but loadmore, you should call setAutoRefresh(true) ,and at last, you should call setLoadEnable(mAdapter.getList().size() < 50) to make RefreshLayout konw whether is there any more nor not.

  • Refresh finish,you should call stopRefresh(boolean isSuccess) to make RefreshLayout konw that refresh is over,then the header will disappeared as soon as possible. if you want header disappeare delay, you can call stopRefresh(boolean isSuccess, long delay)

  • which height should go to start refresh ? If height is not specified,the default is the header's height. you can return the height by impl HeaderListener:

      @Override
      public int getRefreshHeight() {
          return (int) (getMeasuredHeight()*0.8f);
      }
    
  • If there is only one header or footer in you project ,dont forget to extend PowerRefreshLoayout and add header or footer once.

Thanks

Thanks to @dalong982242260 and Android SwipeRefreshLayout.

License

   Copyright (c) 2017.  Joe
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].