Question

I want to load the Async image loading for grid view. The image loading should be Async and should only when grid view scrolled. And when scroll up the image should be loaded from cache. Simply i need a loading style just like fb,pinterest.

Was it helpful?

Solution 2

Your exact requirement in serviced by Android Universal Image Loader Library. Check out the github repository here

There is a sample code given here which shows the working of the loader for a grid layout.

Hopefully this will serve your need.

OTHER TIPS

Use Jake Wharton's Picasso Library. (A Perfect ImageLoading Library form the developer of ActionBarSherlock)

A powerful image downloading and caching library for Android.

Images add much-needed context and visual flair to Android applications. Picasso allows for hassle-free image loading in your application—often in one line of code!

Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);

Many common pitfalls of image loading on Android are handled automatically by Picasso:

Handling ImageView recycling and download cancelation in an adapter. Complex image transformations with minimal memory use. Automatic memory and disk caching.

Picasso Jake Wharton's Library

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top