I have an error: setOnItemClickListener cannot be used with a spinner, what is wrong?

前端 未结 6 1680
感动是毒
感动是毒 2020-12-13 16:47

Kindly This is my code below, and I am pasting the error messages underneath: I am trying to use setOnItemClickListener on the spinner, is it permissible?

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 17:12

    See the first line of your logcat:

    java.lang.RuntimeException: setOnItemClickListener cannot be used with a spinner.
    

    setOnItemClickListener cannot be used with a Spinner. Use setOnItemSelectedListener instead.

提交回复
热议问题