i have a Listview which displays list of clients, i have added an onClickListner to Listview so that i can get the detailed information of clicked client.
Li
If you want to pass Client Name which you are displaying in list, you can get id from adapter and use it.
@Override
public void onItemClick(AdapterView> parent, View view, int position,
long id) {
String clientName= (String) ((TextView) view
.findViewById(R.id.client_name)).getText();
Intent intent = new Intent(this, NextActivity.class);
intent.putExtra("client", clientName);
startActivity(intent);
}
}
}