NFOBoy Active Member Licensed User Longtime User May 16, 2012 #1 Ok, so I have used a transparent panel, activated with .SetOnTouchListener from the Gestures library, and can send SetPressed events down to any view on the screen under the transparent Panel. This includes labels. This is indeed a good thing for me, as I get a little bit more text "real estate" out of a label than a button, so, for small displays, I can get my "label_buttons" to display a bit more. However, if I don't use a transparent Panel over the top, is there a way to catch the Down event for a label? No issues setting the .background for different states, so I can see the labels being "SetPressed", but no associated Down event like for a button? I've looked thru the android documentation and it appears there should be an OnKeyDown event available... I just don't know how to grab it! Ross
Ok, so I have used a transparent panel, activated with .SetOnTouchListener from the Gestures library, and can send SetPressed events down to any view on the screen under the transparent Panel. This includes labels. This is indeed a good thing for me, as I get a little bit more text "real estate" out of a label than a button, so, for small displays, I can get my "label_buttons" to display a bit more. However, if I don't use a transparent Panel over the top, is there a way to catch the Down event for a label? No issues setting the .background for different states, so I can see the labels being "SetPressed", but no associated Down event like for a button? I've looked thru the android documentation and it appears there should be an OnKeyDown event available... I just don't know how to grab it! Ross
Erel B4X founder Staff member Licensed User Longtime User May 16, 2012 #2 OnKeyDown will not help here. I recommend you to use a button instead. You can change its internal padding if needed. See this code: http://www.b4x.com/forum/basic4android-updates-questions/11286-edittext-height.html#post63103 Upvote 0
OnKeyDown will not help here. I recommend you to use a button instead. You can change its internal padding if needed. See this code: http://www.b4x.com/forum/basic4android-updates-questions/11286-edittext-height.html#post63103
NFOBoy Active Member Licensed User Longtime User May 16, 2012 #3 ahhh, ok, that works as well... I guess my dive into trying to figure out how to grab other events (which I'm guessing would need a library written) is put off for a little while. :icon_clap: Thanks! Upvote 0
ahhh, ok, that works as well... I guess my dive into trying to figure out how to grab other events (which I'm guessing would need a library written) is put off for a little while. :icon_clap: Thanks!