getting the index of clicked item in a listview
You need to use an AdapterView
and its onItemClick method :
lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> list, View v, int pos, long id) {
yourAdapter.getItem(pos);
}
});