Difference between onItemClickListener and OnItemSelectedListener of AdapterView

后端 未结 3 1798
情书的邮戳
情书的邮戳 2021-01-31 14:34

What is the difference between these two listeners,documentation says :

OnItemSelectedListener - Interface definition for a callback to be invoked when an item in this v

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 15:07

    AdapterView.OnItemSelectedListener is invoked only when the newly selected position is different from the previously selected position or if there was no selected item.

    However AdapterView.OnClickListener is invoked even you click the same item everytime.

    http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html

提交回复
热议问题