我有这样的事情在我MainActivity.javaAndroid的 - 在ImageView的
m_dbmanager.addRow(
"http://pl.wikipedia.org/wiki/1_stycznia",
"1",
"http://assets3.parliament.uk/iv/main-large//ImageVault/Images/id_7382/scope_0/ImageVaultHandler.aspx.jpg");
月1日的报价是链接,我送在另一个活动的WebView,第二次报价(“1”)是行的名称,最后一个第三个引号是我想要连续显示的图像的url。
这里是我负责与图像交互的代码的一部分。
public View getView(int position, View convertView, ViewGroup parent)
{
View v = convertView;
if (v == null)
{
LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
v = vi.inflate(R.layout.row, null);
}
Order o = items.get(position);
if (o != null)
{
TextView name = (TextView) v.findViewById(R.id.row_textView);
ImageView image_view = (ImageView) v.findViewById(R.id.row_imageView);
if (name != null)
{
name.setText("Name: "+o.getOrderName());
}
if(image_view != null)
{
final String thumbail = o.getOrderImage(); //TODO, just trying
final String link = o.getOrderLink();
image_view.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view)
{
Intent intent = new Intent(MainActivity.this, TemplateActivity.class);
intent.putExtra("urlString", link);
startActivity(intent);
}
});
}
}
return v;
}
}
Order class in case someone would like to see
现在 - 我该怎么办,以显示URL的地方对象row_imageView“的addRow指定的图像?
谢谢你在前进,
参见[使用的AsyncTask下载图像](http://jmsliu.com/1431/download-images-在ListView中显示图像 – 2014-09-10 12:15:11
尝试使用https://github.com/thest1/LazyList – 2014-09-10 12:21:21