我正在为一个朋友搞笑图片网站建立一个应用程序。我从android开发者网站下载了gridview activity,但它只是加载了预设的图像urls,这对我们来说是行不通的。我们需要一个图像加载器,可以从网站自动加载图像。
任何帮助都将不胜感激。
发布于 2013-03-26 11:11:04
希望AQuery库就是您希望在ImageView上轻松加载图像的库
发布于 2013-03-22 20:01:08
发布于 2013-03-22 19:58:41
试试这个
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;
}
}https://stackoverflow.com/questions/15569642
复制相似问题