Lazy Loading GridView


I just added sample code showing one method of lazy loading images in a GridView. I used thread, handler, and the looper classes. It starts by displaying a GridView with a ViewSwitcher that initially displays ProgressBars for each image. Then as the images are sequentially loaded the ViewSwitcher switches to the loaded ImageView.

Check it out here.

Screen shot:
Lazy Loading GridView Example Screen Shot

Lazy Loading GridView Example Screen Shot

Master Android Development with RxJava

Minirxjavacover

Get this FREE 7000+ word guide as a pdf, so that you can take it with you and read it on the go.


I'll teach you about RxJava so that you can:

  • Write better android apps
  • Handle concurrency easily
  • Take full advantage of useful Rx libraries
I'll even throw in an extra chapter on common mistakes, and how to avoid them.
We won't send you spam. Unsubscribe at any time. Powered by ConvertKit

Master Android Development with RxJava

Common rx java mistakesv2

Get this FREE 7000+ word guide as a pdf, so that you can take it with you and read it on the go.


I'll teach you about RxJava so that you can:

  • Write better android apps
  • Handle concurrency easily
  • Take full advantage of useful Rx libraries
I'll even throw in an extra chapter on common mistakes, and how to avoid them.
We won't send you spam. Unsubscribe at any time. Powered by ConvertKit

Comments 6

  1. Tried your example; which I appreciate. Although If you have a lot of images which are large your example runs out of memory. If you scroll up and down within the GridView the Images never show up.

  2. Thanks for the comment. Have you tried adjusting inSampleSize on the BitmapFactory.Options(located on line 89 in ImageLoader.java)?

  3. Very Good Example But Problem is If i Move the Scroll Bar that time Previous Loading Images is Loading Again.

Leave a Reply

Your email address will not be published. Required fields are marked *