How to get the selected item from ListView?

By default, when you click on a ListView item it doesn’t change its state to “selected”. So, when the event fires and you do:

myList.getSelectedItem();

The method doesn’t have anything to return. What you have to do is to use the position and obtain the underlying object by doing:

myList.getItemAtPosition(position);

Leave a Comment