0

When I use images from the internet in a Listview, my Listview scrolls very slowly.
But in some applications such as Twitter, Google+ and other applications (despite showing images from the internet) there is no problem with scrolling and it is very fast and smooth.

How do I improve the performance of a Listview with images?

oers
  • 18,436
  • 13
  • 66
  • 75
maxoya
  • 53
  • 1
  • 9
  • See this thread: http://stackoverflow.com/questions/11684520/efficient-listview-in-android , probably this is what you are looking for. – overbet13 Jul 30 '12 at 12:56
  • Must check => [Android - How do I do a lazy load of images in ListView](http://stackoverflow.com/a/3068012/379693) – Paresh Mayani Jul 30 '12 at 13:00

3 Answers3

0

Check out this one, list view performance optimization from Larse Vogella

You can also use endless list or lazy loading where you load only some part of data in listview & load other when user reaches bottom of list lazy loading OR Commonsware's adapter for endless loading

Community
  • 1
  • 1
monish_sc
  • 146
  • 6
0

There are some ThumbRules which might help you in optimizing listview:

-> Reuse Views by using ConvertView, in

`getView(AdapterView<?> adapterView, View convertView, int position, long id)`

->. Use Lazy Loading for Loading images from web, see

http://codehenge.net/blog/2011/06/android-development-tutorial-asynchronous-lazy-loading-and-caching-of-listview-images/

-> Also use ViewHolders to improve inflation time.check link:

http://jmanzano.me/efficient-listviews-in-android-viewholder-pattern-2/

Javier Manzano
  • 4,761
  • 16
  • 56
  • 86
jeet
  • 29,001
  • 6
  • 52
  • 53
0

use LoaderImageView in your listview. you can get LoaderImageView code from here http://blog.blundell-apps.com/imageview-with-loading-spinner/

modify the LoaderImageView code to store the drawable downloaded

Vishal Pawar
  • 4,324
  • 4
  • 28
  • 54