You can send position of selected row in ListView to another Activity using intent.putExtra
as:
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setClass(ListActivityw.this,SecondActivity.class);
intent.putExtra("position",Integer.toString(arg2));
ListActivityw.this.startActivity(intent);
}
});
In Second Activity:
//obtain Intent Object send from SenderActivity
Intent intent = this.getIntent();
/* Obtain String from Intent */
if(intent !=null)
{
String position = intent.getExtras().getString("position");
(if position == "1") {
imageview src = "pic 1;
}
///your code here
}
else
{
// DO SOMETHING HERE
}