I have an Android custom listview adapter,
I need to stream/load some images into my custom-row-layout/ImageView.
So I have try with:
myImageView.setImageBitmap(BitmapFactory.decodeFile(o.getIcon_url()));
Like this code below.
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
if (v == null) {
LayoutInflater vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.row_applications, null);
}
ApplicationsModel o = items.get(position);
if (o != null) {
ImageView tv_icon = (ImageView) v.findViewById(R.id.iv_icon);
if(row_icon !=null)
{
tv_icon.setImageBitmap(BitmapFactory.decodeFile(o.getIcon_url()));
}
}
return v;
}
But the images do not reader in my custom-listview.
The code works with TextView´s..
imageLoader.DisplayImage(“URL_you_image”, YOUimageIcon);
hm i am use this source https://github.com/thest1/LazyList works well, loads images asynchronously;)