How to extract the text from the selected item on the listView

Use this:

String selectedFromList = (String) (lv.getItemAtPosition(position));

Whatever the datatype you are having in your list, cast accordingly.

Hope it will help. 🙂

Leave a Comment