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
Try this code:
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView> parent, View view, int position, long id) { Toast.makeText(getApplicationContext(),(String)parent.getItemAtPosition(position),Toast.LENGTH_SHORT).show(); } });