我有這樣的事情在我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