Reflector. SetOnClickListener (sub As String)Target must be a View of some sort.
In most cases Basic4Android will have already exposed this as a Click event.
Sets the OnClickListener of the view to a Sub that must have a signature of
Sub Whatever(viewtag As Object).
B4A Question Reflector.SetOnClickListener not working in release build - Computersmith64    Apr 3, 2018   (1 reaction)
Private r As Reflector
r.Target = mImage
r.SetOnClickListener("machineClick...) as one of its members. When I initialize the class, I use reflector to set the onClickListener for... - the listener sub is called whenever the ImageView is tapped on. In release mode however, the listener...
B4A Question Click Event on Label (TabStripViewPager) - ilan (first post)    Jun 14, 2017
Use Reflector.SetOnClickListener to add a click event: https://www.b4x.com/android/help/reflection.html#reflector_setonclicklistener
Wow this is amazing. I had no clue its possible to do that. Thank you :)...
B4A Question SetOnClickListener - b4auser1    Jan 21, 2014
Is it possible to tell Reflector, which module holds the Sub, to be called after setting it in the SetOnClickListener ?...
B4A Question Animation to Custom View - Star-Dust (first post)    Sep 1, 2018
no it not showing any effect
I wrote the object type badly, copy this
Private Sub mBase_Click (viewtag as object)
If SubExists(mCallBack,mEventName & "_Click") Then
CallSub(mCallBack,mEventName & "_Click")
See this: https://www.b4x.com/android/help/reflection.html#reflector_setonclicklistener...
B4A Library Amir_Fragment - alimanam3386 (first post)    Feb 28, 2019   (1 reaction)
For question#2 test below code:
Dim r As Reflector = Parent
Sub Parent_Click(ViewTag As Object)
for question#1 : I try to find a solution for it :cool:...
B4A Question Photo view click listener - Emme Developer    Dec 11, 2017
Hi to all! I'm using this library. Is possible to get click event? I tried this, but sub is never handled Dim p as photoview '.... '.... Dim r As Reflector r.Target = p.asview r.SetOnClickListener("Click_Click") Sub Click_Click (ViewTag As Object) Log("handled") End Sub...
Italian xCustomView - Star-Dust (first post)    Aug 6, 2021   (1 reaction)
Comunque per cambiare l'evento di una label (come lbl ricevuta dal design) puoi usare questo codice, con la librerie Reflection
Dim obj As Reflector
Ma continuo a sconsigliare di fare cosi. Puoi Assorbire comunque le preferenze da lbl e passarle a un altra Label...
B4A Question SetField of a Type with Reflector or JavaObject ? - Martin D.    Jan 14, 2020
Hi, I want to use a type as an enum and I don't want to set the value of each string of that type since the fieldname IS what the string value will be. How to do it with Reflector or JavaObject...
B4i Question B4i replacment "Reflector" - tariqyounis    Sep 12, 2020
Dim r As Reflector
r.Target = WebView1
r.Target = r.RunMethod("getSettings")
r.RunMethod2("setBuiltInZoomControls", True, "java.lang.boolean")
r.RunMethod2("setDisplayZoomControls", False, "java.lang.boolean")
What shall I do to activate the event "WebView1_PageFinished(Url As String)" as it is working in B4A...
B4A Question Disable Scrollview click event - Emme Developer (first post)    Jan 29, 2018
ScrollView does handle the touch gestures. It will not pass them to the underlying control. Maybe you can add a gesture detector. I tried also this, but I could not do it. I tried to use Reflection to handle click event on Scrollview. Tried this, but doesn't work Dim r As Reflector r.Target = scv.Panel r.SetOnClickListener("scvPanel_Click") r.Target = scv r.SetOnClickListener("scvPanel_Click")...
Page: 1   2   3   4   5