Android ImageView's onClickListener does not work

前端 未结 15 1806
情话喂你
情话喂你 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:17

    Ok,

    I managed to solve this tricky issue. The thing was like I was using FrameLayout. Don't know why but it came to my mind that may be the icon would be getting hidden behind some other view.

    I tried putting the icon at the end of my layout and now I am able to see the Toast as well as the Log.

    Thank you everybody for taking time to solve the issue.. Was surely tricky..

提交回复
热议问题