How to get the selected item from ListView?

前端 未结 9 690
我寻月下人不归
我寻月下人不归 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:14

    In touch mode, there is no focus and no selection. Your UI should use a different type of widget, such as radio buttons, for selection.

    The documentation on ListView about this is terrible, just one obscure mention on setSelection.

提交回复
热议问题