For Android apps, there are several ways to download images from the Internet:
1,
2. Use aquery
Simple:
AQ. ID (R. Id. image1). Image ("http ://...")
Cache Control
Boolean memcache = false;
Boolean filecache = true;
AQ. ID (R. Id. image1). Image ("http: //...", memcache, filecache );
Down sampling
AQ. ID (R. Id. image1). Image (imageurl, true, true, 200,0)
Fallback Image
// If we are not able to load the image, use a default image
AQ. ID (R. Id. image1). Image (imageurl, true, true, 200,0, R. drawable. default_image)
Preloading
SS
String imageUrl = "http://farm6.static.flickr.com/5035/5802797131_a729dac808_b.jpg";aq.id(R.id.image).progress(R.id.progress).image(imageUrl, false, false);
Sample grid item layout:
<Relativelayout xmlns: Android = "http://schemas.android.com/apk/res/android" Android: layout_width = "fill_parent" Android: layout_height = "100dip"> <progressbar Android: layout_width = "15dip" Android: layout_height = "15dip" Android: Id = "@ + ID/progress" Android: layout_centerinparent = "true"/> <imageview Android: Id = "@ + ID/image" Android: layout_width = "fill_parent" Android: layout_height = "75dip"/> </relativelayout>
And so on,
Web: http://code.google.com/p/android-query/wiki/ImageLoading
Android sometimes has nothing to do with logcat. Click ddms and it will be OK.