开发者

ListView and images displaced in the getView method

开发者 https://www.devze.com 2022-12-31 20:02 出处:网络
I have extended an ArrayAdapter to manage a ListView using a certain tamplate (made of 1 ImageView and 1 TextView contained in a RelativeLayout) as row of the list.

I have extended an ArrayAdapter to manage a ListView using a certain tamplate (made of 1 ImageView and 1 TextView contained in a RelativeLayout) as row of the list.

Anyway I am now facing some optimization issues. As you guys know, not all the rows are rendered at any 1 time but rather you get the rows progressively rendered when the user scrolls the list and they actually appear on the screen. Basically my problme is this:

when the list is scrolled really rapidly, the rendering engine cannot keep up with the speed and, although the images to display are cached, the placement of the images in the ImageViews of the visible rows take some time.

To be honest I was expecting the getView method to be really fast but apparently when it comes to images there are some tricks to know. Any1 wanna开发者_如何学Go share ??

cheers ;)


You may take a look at my sample. It does exactly the same Lazy load of images in ListView.

0

精彩评论

暂无评论...
验证码 换一张
取 消