In response to this question.
you can add touch to a button using reflection:
But it still wont trigger unless the finger is touched on the object that is being monitored.
You could use my Hotspot code module which would monitor a whole panel and tell you when a finger moves into the hotspot.
Download from here.
Change the code in Panel1_Touch from Activity.ACTION_DOWN to Activity.ACTION_MOVE.
Try it out, hopefully it'll give you what you want.
you can add touch to a button using reflection:
B4X:
Dim R As Reflector
R.Target=Button1
R.SetOnTouchListener("Button1_Touch")
.......
Sub Button1_Touch(ViewTag As Object, Action As Int, X As Float,Y As Float, Motionevent As Object) As Boolean
Log("Touched")
End Sub
But it still wont trigger unless the finger is touched on the object that is being monitored.
You could use my Hotspot code module which would monitor a whole panel and tell you when a finger moves into the hotspot.
Download from here.
Change the code in Panel1_Touch from Activity.ACTION_DOWN to Activity.ACTION_MOVE.
Try it out, hopefully it'll give you what you want.
Last edited: