分页在RecyclerView自身回收视图时的用途是什么?

huangapple go评论108阅读模式
英文:

What is the use of pagination while Recyclerview itself recycle views?

问题

我困惑于在Android的RecyclerView中使用分页,他们说如果RecyclerView的数据很大,最好使用分页。RecyclerView难道不是只加载在屏幕上可见的数据吗?那为什么要使用分页?

我的RecyclerView能正常工作,但我不知道是否要使用分页。谢谢。

英文:

I am confused regarding using pagination in android Resyclerview, they say if Recyclerview data got large it is better to use pagoination. Doesn't Recyclerview load data as much as it is visible on the screen? Then why use pagination?

My Recyclerview works but I don't know wether to use pagination. Thank you.

答案1

得分: 1

分页用于从服务器本身获取大量数据,RecyclerView是以单元格形式加载数据的组件。但从服务器获取数据需要时间。为了减少API调用时间并在API端以适当的方式进行管理,我们需要分页。分页和RecyclerView是不同的。分页是获取数据的技术,而RecyclerView是加载数据的组件。希望这对您有所帮助。

英文:

Pagination is used to get large number of data from the server it self, recycler view is the component that loads data in the form of cell. but to getting data from the server it will take time. so reduce the api call timing and also to manage in proper way from the api side we require pagination. pagination is different and recycler view is different. Pagination is technic to get data and recyclerview is the component to load data.

I hope, it will help you.

huangapple
  • 本文由 发表于 2023年5月17日 22:19:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/76273138.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定