安卓:我怎样才能加快GridView控件的滚动? [英] Android: How can I speed up the scrolling of GridView?

查看:128
本文介绍了安卓:我怎样才能加快GridView控件的滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示的都是一样的大小(有超过150图像)的图像(即是166dp x 249dp图像的7列)一个GridView和我使用过的观点持有者模式的看法回收机制适配器的方式。我的观点都只是ImageViews。没有太多的事情,应该在这个小部件减缓滚动(有一次21的图像在屏幕上),但事情只是滚动,以便震荡。我能做些什么来加快步伐?

I have a GridView that displays images (7 columns of images that are 166dp x 249dp) that are all the same size (there are over 150 images), and I'm using the view recycling mechanism through the view holder pattern by way of an adapter. My views are all simply ImageViews. There isn't much going on that should be slowing the scrolling on this widget (there are 21 images on screen at a time), but the thing just scrolls so choppy. What can I do to speed it up?

推荐答案

我跟一些男孩在谷歌的最后的谷歌开发者实验室时,他们告诉我说,GridView控件不保持非常多,我应该使用的ListView ,奠定了自己的行code键使电网。这是我做的,它现在快如闪电。

I spoke with some of the boys at Google during the last Google Developer Lab and they told me that GridView is not maintained very much, and that I should use ListView, laying out the rows myself in code to make a grid. This is what I did and it's now lightning fast.

这篇关于安卓:我怎样才能加快GridView控件的滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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