Android Question [solved] List of all events ?

svanneste

Member
Licensed User
Hello,
Does it exist a list of all events the IDE can handle, please ? Until last night I thought that writing Sub than space and TAB would propose all the events available. But as I needed to trap long press and than release of a button, I just saw we only had proposed "_Click" and "_LongClick" even if "_Down" and "_Up" do exist and seem to work as expected.
So, I am wondering where I could find the information. Thanks
 

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

svanneste

Member
Licensed User
Hello Alexander,
The library is the core one (attached a very light project to demonstrate). And below is the event I have listed.


Maybe I'm doing something wrong ? Thanks
 

Attachments

  • tst_btn.zip
    9.1 KB · Views: 87
Upvote 0

svanneste

Member
Licensed User
That´s all Events the Button supports.

What exactly are you trying to archieve?
I am doing a PTT button. So, I start a AudioStreamer recording when the button is long pressed and have to stop the recording when the button is Up then.

About the event the button supports, it seems to get the _Up state as I can catch it (the small project provided demonstrate it).
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
That´s all Events the Button supports.
That answer in post #4 appears to be incorrect.
"_Down" and "_Up" do exist and seem to work as expected.
As @svanneste says in his original post and as his test app demonstrates, there are other apparently undocumented but workable events.
So, I am wondering where I could find the information.
... and I don't think that we have answered his original (and interesting) question.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Does it exist a list of all events the IDE can handle, please ?

The IDE does NOT handle events... of it's OWN!
The IDE exposes the events that each view/custom view/library expose to the IDE

i.e: Many CustomViews have custom events, that may even not be a "standard" event from the views it is composed of, and even not expose any of the "standard" views events.

Some views may have undocumented events, or even have "not to be used" events that were exposed by smelly-code.
... and I don't think that we have answered his original (and interesting) question.
He's question, as explained, is wrong...
So, I am wondering where I could find the information.
You need to look into the targeted view's documentation, not only here on the forum, but also in its "original" java ...
Reflection and JavaObject libs were created exactly with the purpose of helping expose event's, methods and props that may sometimes not be exposed in the B4X library.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
The Up and Down Button events are deprecated, not documented, but still available. This comment is in Core.xml and is visible if you hover the mouse over the "Button" in a line such as "Dim btn as Button".

Note that the Up and Down events are still implemented but should not be used as they will not work properly on all devices.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…