I have a listview with some items. I would like to get the text from the selected item.
Here is my list adapter and the onItemClickListener:
ListView
For this you need to write the following:
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView> parent, View view,
int position, long id) {
TextView textView = (TextView) view.findViewById(R.id.list_content);
String text = lv.get(position).toString().trim();
System.out.println("Chosen Country = : " + text);
}});