What the purpose of the getSelectedItem() from the ListView

前端 未结 2 1026
旧巷少年郎
旧巷少年郎 2021-01-25 03:52

What the purpose of the getSelectedItem() from the ListView if a list can\'t keep state of a selected item ?

2条回答
  •  天涯浪人
    2021-01-25 04:08

    It can keep track of a selected item if you were to use say, a checkbox or a checkedtextview, but if you want to keep track of your selected items via a "highlighted background", then it's not possible (unless you want to have a hidden checkbox)

提交回复
热议问题