Android ImageView's onClickListener does not work

前端 未结 15 1804
情话喂你
情话喂你 2020-12-01 13:30

I have an ImageView for which I wanted to implement the onClickListener. But when I click on the image, nothing happens. Event the Logcat does not show any errors.

F

15条回答
  •  粉色の甜心
    2020-12-01 14:22

    Well my solution was another one, or let's say, the bug was:

    I simply had another imageview with the same id in another twice-encapsuled xml layout, which was found before the one that i wanted to react on the click. Solution: Give one of them another id...

提交回复
热议问题