这是在gridview的项目的最大数目 [英] What is the maximum number of items in gridview

查看:113
本文介绍了这是在gridview的项目的最大数目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示15,000种产品(图像)在网格视图,我可以一次装载所有图像网格视图从SD卡。请帮我在这。

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.

推荐答案

您可以写code加载它们的万五千一次,如果这就是你在问什么。不过,我可以向你保证,你会碰到一个OutOfMemoryException加载太多了。

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.

这篇关于这是在gridview的项目的最大数目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆