Why is my onItemSelectedListener not called in a ListView?

后端 未结 3 1333
暖寄归人
暖寄归人 2020-12-15 02:45

I\'m using a ListView that is setup like this:



        
3条回答
  •  醉话见心
    2020-12-15 02:56

    The OnItemSelectedListener listens for list item selections and not list item clicks.

    A selection in this case could be seen as moving the focus on this item with the device's trackpad.

    To get the wanted behavior one must use the OnItemClickListener.

提交回复
热议问题