美文网首页
SwipeRefreshLayout内Recyclerview刷

SwipeRefreshLayout内Recyclerview刷

作者: 强大帅 | 来源:发表于2018-05-25 15:32 被阅读0次

    功能要求:分页加载网络数据,实现上拉下拉功能
    错误日志:java.lang.IndexOutOfBoundsException
    解决办法:先清空dataList,在进行赋值

                        dataList.clear();
                        if (adapter != null) {
                            adapter .notifyDataSetChanged();
                        }
                        getDataList();
                        if (adapter != null) {
                            adapter .notifyDataSetChanged();
                        }
    

    相关文章

      网友评论

          本文标题:SwipeRefreshLayout内Recyclerview刷

          本文链接:https://www.haomeiwen.com/subject/ytcujftx.html