I have made a ListView
which has some rows. In the ItemClickListener
I want to access which item of the row is clicked
lstcontact.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String v=lstcontact.getItemAtPosition(position).toString();
if(view.getId()==R.id.btncall) {
Toast.makeText(MainActivity.this, "Make A Call at " + position, Toast.LENGTH_SHORT).show();
}else if(view.getId()==R.id.btnmess) {
Toast.makeText(MainActivity.this, "Make A Message at " + position, Toast.LENGTH_SHORT).show();
}
}
});
I want to display a toast when the user clicks on the message or call button