How to get the selected item from ListView?

前端 未结 9 705
我寻月下人不归
我寻月下人不归 2020-11-29 03:26

in my Android app I have created a ListView component called myList, and filled it with objects of my own custom type:

class MyClass{

    private String di         


        
9条回答
  •  旧巷少年郎
    2020-11-29 04:07

    MyClass selItem = (MyClass) myList.getSelectedItem(); //

    You never instantiated your class.

提交回复
热议问题