问题
I want to display 15,000 items(images) in grid view, can I load all images at once in grid view From SD card. Please help me on this.
回答1:
You could write code to load all 15,000 of them at once, if that's what you're asking. However, I can guarantee you that you'll run into an OutOfMemoryException before you load too many.
To get around this, you should lazy load the images, as this will only load the ones you need.
回答2:
You can implement the lazy loading concept to load the images in gridview. Get all the image path or by limitation. The preferable was get the data in cursor using limit and load the images in imageview when they are seen on screen. this thing you can implement in Adapter to load images those which are current displayed.
check out the links
http://blog.jamesbaca.net/?p=67
来源:https://stackoverflow.com/questions/12598701/what-is-the-maximum-number-of-items-in-gridview