Android Question Label click event not being raised?

Danamo

Member
Licensed User
On one activity in my app the label click event does not work.

As usual, from the Designer I add a label view Label1, then from Tools/Generate Members I select/checkmark the label name and the Click option, and then Generate Members. This adds Label1 as Label to Globals and creates the sub and end sub for Label1_Click in the code.

And in the sub I have some code for what the app should do when the label is clicked.

But when I run the app and touch/click the label, it doesn't raise the sub event. It doesn't go to the sub and execute the commands in the sub.

In debug mode I put a breakpoint in the Label1_Click sub to verify this. The program execution never gets to the breakpoint to halt there. It just completely ignores whenever the label is clicked during program execution and never goes to the sub to perform the commands there.

This problem only occurs on one activity of the app. And only for labels. Other clickable views on that same activity work fine, and labels on other activities in the same app work fine.

I can work around this problem by using buttons instead of labels, but it just bugs me that labels won't click on that one activity!

Any suggestions?
 

Danamo

Member
Licensed User
Thanks for your response to my question.

There is a Table on the activity, which I had set to a vertical size which was too big. The Table isn't shown in the Designer since it doesn't exist until the Activity is created, and the data which populates the Table doesn't fill the entire area specified for the Table, so I didn't see that the empty part of the Table was overlapping the Label and thus making the Label inaccessible to clicking.

My dumb mistake, but your suggestion about a transparent panel gave me the clue to figuring it out. Thanks for taking the time to give a helpful response to my question!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…