Android Question No label click event after changing Targetsdkversion to 26

Bryan Joyce

Member
Licensed User
Longtime User
I upgraded my targetsdkversion to 26 and now I can't get click events on my labels. I assume this is a runtime permission but am not sure how to correct it. Any idea how to fix this?

Thanks,
Bryan
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
I upgraded my targetsdkversion to 26 and now I can't get click events on my labels. I assume this is a runtime permission but am not sure how to correct it. Any idea how to fix this?

Thanks,
Bryan
I doubt that it's a runtime permission issue. Can you post the relevant code?

- Colin.
 
Upvote 0

Bryan Joyce

Member
Licensed User
Longtime User
Thanks for the reply. I will try to reproduce it with a simple program but it works on 18 and with no other changes does not work on 26
 
Upvote 0

Bryan Joyce

Member
Licensed User
Longtime User
Thanks. I posted too quickly without doing enough troubleshooting. In trying to reproduce the problem in a simple piece of code I found the issue. I had an invisible button in the background to prevent all click events getting to another component and the label on top of that. With the new version of the targetSDKversion it seems buttons can never be anything but the top layer and you can't get a click event for anything that is put on top of them. Actually you can't put anything on top of them at all. This invisible button took the events. Solution was to put the label on a panel. Thanks for the replies
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…