Reputation: 47
I'm building an app for a friends funny pictures website. I downloaded the gridview activity from the android developers website, but it just loads preset image urls, and that's simply not going to work for us. We need an image loader that can automatically load images from the site.
Any help would be greatly appreciated.
Upvotes: 0
Views: 211
Reputation: 2973
Hope AQuery library is what you are looking for easy image loading on ImageView
Upvotes: 1
Reputation: 2116
Rather than what others are suggesting, I think the best way to do this is use a UniversalImageLoader. It will allow you to Lazy Load, and cache on the SD card and internal storage. In short, it makes things simpler and allows you to get the fastest speed possible. Try it out.
Upvotes: 0
Reputation: 287
Use lazylist download https://github.com/thest1/LazyList
Lazy load of images in ListView
Upvotes: 2
Reputation: 6514
Try out this
Drawable drawable = LoadImage(<Replace this with your url> + UserProfile.Photo);
UserPhotoImageView.setImageDrawable(drawable);
<replace with Your Image View>.setImageDrawable(drawable);
public Drawable LoadImage(String url)
{
try
{
InputStream is = (InputStream) new URL(url).getContent();
Drawable d = Drawable.createFromStream(is, "src name");
return d;
}
catch (Exception e)
{
System.out.println("Exc=" + e);
return null;
}
}
Upvotes: 0