本文介绍了向下滚动到使用recycleview和SwipeRefreshLayout加载数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在四处寻找新的材料设计刷卡的实施下,刷新RecyclerViews的负载循环从底部来看同样喜欢新的Gmail app.i下来,发现这么多东西。但没有得到类似的例子或演示。我已经实现了refreshlayout和recycleview新的Gmail应用程序。

但是,当向下滚动到recycleview,如何把装载圈在最后记录的recycleview。我希望得到一些主意,把在recycleview的onscroll。

  recyclerView.setOnScrollListener(新RecyclerView.OnScrollListener(){
            @覆盖
            公共无效onScrollStateChanged(INT为arg0){
            }

            @覆盖
            公共无效onScrolled(INT为arg0,诠释ARG1){

                //添加一些数据,但不显示加载程序。
                getDataFromDB();

            }
        });
 

解决方案

您好如果您wan't开发这样一种布局的话,请点击此链接,我是用它这是一个真棒。

https://github.com/stormzhang/SwipeRefreshLayoutDemo

We've been looking around for the implementation of the new material design swipe down to refresh on RecyclerViews with the loading circle coming down from bottom view same like new gmail app.i found so many things. But not getting new gmail app like example or demo .i already implement refreshlayout and recycleview.

But when scroll down to recycleview,how to put loading circle at the last of the record in recycleview. I want to get some idea to put in onscroll of recycleview.

recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrollStateChanged(int arg0) {
            }

            @Override
            public void onScrolled(int arg0, int arg1) {

                //add some data but not to show loader.
                getDataFromDB();

            }
        });
解决方案

hi If you wan't to develop such a kind of Layout then please follow this url, i was used it it's an awesome.

https://github.com/stormzhang/SwipeRefreshLayoutDemo

这篇关于向下滚动到使用recycleview和SwipeRefreshLayout加载数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 21:50