Skip to content

刷新数据时,同时会调用loadMore #25

Description

@qingtianbuyu

下拉刷新后,listView.startLoadMore();将会自动触发上拉加载更多。。。。
数据解析:

if (arg0.size() > 0) {
                if (actionType == STATE_REFRESH) {
                    curPage = 0;
                    bankCards.clear();
                    listView.setRefreshSuccess();
                     listView.startLoadMore();////********执行这里会自动执行上拉方法*****************
                } else if (actionType == STATE_MORE) {
                    listView.setLoadMoreSuccess();
                }

                // 将本次查询的数据添加到bankCards中
                for (TestData td : arg0) {
                    bankCards.add(td);
                }
                curPage++;
                showToast("第" + (page + 1) + "页数据加载完成");
            } else if (actionType == STATE_MORE) {
                showToast("没有更多数据了");
                listView.stopLoadMore();
            } else if (actionType == STATE_REFRESH) {
                showToast("没有数据");
                listView.stopLoadMore();
            }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions