I've got something like this in my 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");
1st quote is link which i send to webview in another activity, 2nd quote("1") is name of the row, and the last 3rd quote is url to image i want to show in a row.
and here is my part of code responsible for interaction with images.
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
Now - what do I do to show the image from URL specified in addRow on place of object 'row_imageView'?
Thank you in advance,