B4A Question [SOLVED] Setting up an on touch listener with the reflection library - LucaMs (first post)    Dec 22, 2019   (1 reaction) theReflector.SetOnTouchListener("MapTouch")
theReflector.Target = MoldMapView
You should set the target first.
theReflector.Target = MoldMapView
theReflector.SetOnTouchListener("MapTouch")
... B4A Question Button pressed property - Spavlyuk (first post)    Feb 22, 2022 Use SetOnFocusListener to detect ACTION_DOWN/ACTION_UP: https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener... B4A Question Classes are soon coming... - Erel    Jun 4, 2012   (2 reactions)   tags: Classes Dim r As Reflector r.Target = panel1 r.SetOnTouchListener("Panel1_Touch") 'why reflection instead of the regular Panel_Touch event? Good question which deserves a forum thread of its own (not related to classes)... End Sub Private Sub Panel1_Touch (o As Object, ACTION As Int... B4A Question Is Panel1_Touch() a boolean function? - Erel (first post)    Jan 25, 2017 ?). It behaved like Reflector.SetOnTouchListener.
The behavior was changed due to a change in Android. You can safely use Reflector.SetOnTouchListener. Just make sure not to call DoEvents or show a modal dialog:
https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener... B4A Question How to get x, y coordinates of an image view placed inside panel of scrollview? - Erel (first post)    Nov 10, 2016 You can use Reflector.SetOnTouchListener to add a touch listener to any view you like: https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener... B4A Code Snippet Disable ViewPager Swipe (Touch) - Mehrzad238    May 15, 2025   (3 reactions) I use this code if I ever need to disable the touch event of the view pager. It's useful if you wanna create a survey, so users cannot swipe the viewpager. Sub DisableViewPagerSwipe Dim r As Reflector r.Target = Vp r.SetOnTouchListener("Vp_Touch") End Sub Sub Vp_Touch(View As Object, Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean Return True End Sub... B4A Question touch the screen anywhery - Erel (first post)    Mar 10, 2016 You can add a transparent panel above all views and add a touch listener with Reflector.SetOnTouchListener: https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener Return False from the event sub and the event will pass through it.... B4A Question Get value to an array - Erel (first post)    Feb 1, 2015 You should use Reflector.SetOnTouchListener: https://www.b4x.com/android/help/reflection.html#reflector_setontouchlistener... B4A Question Increase Touch_Panel function precision - Erel (first post)    Jan 17, 2016 Yes. Use Reflector.SetOnTouchListener.... B4A Question slow and fast _touch events - Erel (first post)    Aug 22, 2017   (1 reaction) Use Reflector.SetOnTouchListener instead of Touch event (https://www.b4x.com/android/forum/threads/difference-between-reflection-ontouchevent-and-panel_touch.44711/#content).... Page: 1   2   3   4   5   6   7   |