android - 下拉刷新,网络请求数据刷新
PHP中文网
PHP中文网 2017-04-17 17:40:37
0
4
727

下面是网络请求接口

想问下android的下拉请求 我之前的网络请求参数是page 在我加载好几页的数据后,再去下拉刷新,这个改怎么去发请求刷新数据??才能保证我之前加载的好几页数据都被刷新了

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(4)
Peter_Zhu

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

Ty80

Just enter the corresponding page directly

黄舟

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

迷茫

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template