下面是网络请求接口
想问下android的下拉请求 我之前的网络请求参数是page 在我加载好几页的数据后,再去下拉刷新,这个改怎么去发请求刷新数据??才能保证我之前加载的好几页数据都被刷新了
天蓬老师2017-04-17 17:42:37
Refresh usually sets the page to 0 to load the first page of data. After refreshing, doesn’t pulling up refresh the previous one? If you want to refresh several pages at once, you can cycle the page as mentioned on the second floor, or Put per_page into the parameter to dynamically change the value
黄舟2017-04-17 17:42:37
To refresh, just reload the first page. If you must load all pages, then loop through the page and request multiple times, and then parse out list.addAll(jsonList). That’s it
迷茫2017-04-17 17:42:37
Why do we need to update the data that has already been loaded? If updates are forced, what's the point of pagination? For some news-type static data, there is no need to refresh it after it is loaded. If some data content in the database changes frequently, it is recommended that the server handle it and give you the changed data the next time you request paged loading.