MainActivity.java にこのようなものがあります
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");
最初の引用は別のアクティビティで webview に送信するリンク、2 番目の引用 ("1") は行の名前、最後の 3 番目の引用は行に表示したい画像への 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;
}
}
オブジェクト「row_imageView」の代わりに addRow で指定された URL から画像を表示するにはどうすればよいですか?
前もって感謝します、