简体   繁体   中英

What is the most efficient way to populate a listview?

I have an app which mains view is a listview. Each item consist of multiple textviews and imageviews. Now, what is the most efficient way to populate these items? String arrays? External text file? Online text files?

for example this is an item in the listview: 在此处输入图片说明

The listview will contain over 50 items and these items will increase every week. So it should be as easy as possible to add new items!

First of all you pick an efficient way that works for YOUR project. I would recommend just using an SQLite database for such. You could use Text files, but you have a database availible for such, so i would recommend using it.

Here is more info on SQLite and how to get started using it.

EDIT:

Also you could possibly use online text files. And just read the information from them. This may take some time when populating the list, so i would recommend doing this in he background, and trying to write the information to a abase.

Using SQLite and getting started

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM