Lazy loading from SQLite

后端 未结 1 486
慢半拍i
慢半拍i 2021-02-15 17:26

I have some 4500 entries in my database. What is the best way to show them in a ListView. Should I load them all in one stretch when the application initializes or should I use

相关标签:
1条回答
  • 2021-02-15 18:20

    I would like to point you to here first but I also have some experience I would like to share.

    First, showing anything more than say 500 items in a list is probably going to cause users to complain (maybe not though). Users can get overwhelmed with info and it gets annoying for users to scroll to see all of the data (even with filters because some users will refuse to use them if they can scroll).

    Second, the data adapter in Android is pretty smart so an adapter over thousands of items will be handled smoothly due to the way Android caches views and iterates through a result set with a cursor which is the subject of that link I pointed you to at the start of my answer.

    0 讨论(0)
提交回复
热议问题