Android 带有图像的listview的自定义阵列适配器

Android 带有图像的listview的自定义阵列适配器,android,listview,android-arrayadapter,Android,Listview,Android Arrayadapter,因此,我遵循教程,以便可以将图像添加到我的listview。问题在于本教程中已安装图像,因此为了获取图像,图像会保存为int,如下所示: private int imageId; private String title; private String desc; public RowItem(int imageId, String title, String desc) { this.imageId = imageId; this.title = title; thi

因此,我遵循教程,以便可以将图像添加到我的listview。问题在于本教程中已安装图像,因此为了获取图像,图像会保存为int,如下所示:

private int imageId;
private String title;
private String desc;

public RowItem(int imageId, String title, String desc) {
    this.imageId = imageId;
    this.title = title;
    this.desc = desc;
}
public int getImageId() {
    return imageId;
}
但我从服务器上获取图像,图像以字符串形式进入应用程序,然后转换为位图。我的问题是,我可以把int改成位图,然后一切都会好起来,还是我还需要做些什么?我不想一路干下去,然后它就不行了

提前谢谢大家,


Tyler

实际上,你想查看一下你的图像并缓存它们,以防止网络冻结你的UI线程。

但是如果我把它改为int-to-bitmap,它还能工作吗。我已经知道应用程序应该总是以字符串的形式获取图像,我不确定如何实现你发布的图像加载器。不,它不会那么容易工作。要查看一个示例,您可以按照我刚才搜索的:listview通用图像加载器教程