kaeppler/ignition — Issue #8: Issue on RemoteImageView used together with HorizontalListView (http://www.dev-smart.com/archives/34)
Author: tfleo
Created: 2012-02-14 05:50:04+00:00
State: open

I can't get any web image to load, not even progress spinner showed up (i only see the spinner for brief moment when doing quick scroll), no errordrawable showed up either. I think there is internal issues here. Can you enlighten me on how to fix this.

gallery_layout:

gallery_listentry:

package com.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.devsmart.android.ui.HorizontialListView;
import com.github.ignition.core;

public class HorizontalListViewDemo extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.gallery_layout);

HorizontialListView listview = (HorizontialListView) findViewById(R.id.gallery_list);
listview.setAdapter(mAdapter);

}

private static String[] url = new String[]{ "http://www.google.com.sg/logos/2012/vday12-res.png",
"http://www.google.com.sg/logos/2012/vday12-res.png",
"http://www.google.com.sg/logos/2012/vday12-res.png" };

private BaseAdapter mAdapter = new BaseAdapter() {

@Override
public int getCount() {
return url.length;
}

@Override
public Object getItem(int position) {
return null;
}

@Override
public long getItemId(int position) {
return 0;
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
View retval = LayoutInflater.from(parent.getContext()).inflate(R.layout.gallery_listentry, null);
RemoteImageView img = (RemoteImageView) retval.findViewById(R.id.img);
img.setImageUrl(url[position]);
img.loadImage();

return retval;
}

};

}