Displaying thumbnails of images (present at different locations in the sdcard) in a listview

Posted by frieza on Stack Overflow See other posts from Stack Overflow or by frieza
Published on 2010-02-16T04:35:40Z Indexed on 2010/04/13 20:03 UTC
Read the original article Hit count: 375

Filed under:
|
|

Hi all, I have several images present in different folders in my sdcard. I would like to display a list of thumbnails. So what I have done is while rendering any row in the list I read the file in an input stream, get the byte array, decode it to obtain a bitmap and set it in an imageview.

So far so good. But when I scroll the list, the list scrolls in jerks. I believe this is because decoding a bitmap from byte array takes some time. What I would like to know is that, is there any optimization which I can do to improve the performance, or better still is there any better method to achieve what I want ?

© Stack Overflow or respective owner

Related posts about android

Related posts about images