英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论