Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How can I speed up the scrolling of GridView?

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?

like image 857
Christopher Perry Avatar asked Jul 29 '11 20:07

Christopher Perry


1 Answers

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.

like image 88
Christopher Perry Avatar answered Nov 07 '22 12:11

Christopher Perry