支持下拉刷新和上拉加载的RefreshLayout,自带越界回弹效果

描述:

RefreshLayout that support for OverScroll and better than iOS

支持下拉刷新和上拉加载的RefreshLayout,自带越界回弹效果

支持RecyclerView,AbsListView,ScrollView,WebView

应用截图:

RefreshLayout

代码解析:

refreshLayout.setOnRefreshListener(new RefreshListenerAdapter(){
            @Override
            public void onRefresh(final TwinklingRefreshLayout refreshLayout) {
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        refreshLayout.finishRefreshing();
                    }
                },2000);
            }

            @Override
            public void onLoadMore(final TwinklingRefreshLayout refreshLayout) {
                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        refreshLayout.finishLoadmore();
                    }
                },2000);
            }
        });
    }

源码下载:https://github.com/lcodecorex/TwinklingRefreshLayout

未经允许不得转载:安度博客 » 支持下拉刷新和上拉加载的RefreshLayout,自带越界回弹效果

赞 (0)
分享到:更多 ()

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址