Panel receives only the Touch event. If I have an activity with all the events of a panel (Click, LongClick and Touch) only the touch will be received. If I remove the Touch sub then the click and LongClick will be received. Is this by design ? As I have read some other posts some people use click and touch events together and this is what I want to do also.
I just tried and it doesn't work. when I type Private Sub the Space and Tab and select the Panel and then the Touch event ... this generates a Sub without a As (return) Boolean. So I added one myself and tested but no luck. Only The touch event is received.
B4X:
Sub Panel1_Touch (Action As Int, X As Float, Y As Float) As Boolean
Log("Panel1_Touch")
Return False
End Sub
Sub Panel1_Click
Log("Panel1_Click")
End Sub
Sub Panel1_LongClick
Log("Panel1_LongClick")
End Sub
i may be wrong with the consuming. I may have another situation in mind
Looks like you need to emulate/recognize the click or longclick by yourself if you are using the touch event
This is no problem for me. I am creating an xui custom view and in b4j the pane touch and mouseclick are received. As I saw in b4a that i have the click and touch i thought that i can use them both.
I will report a bug for this thing. Maybe a notice should pe placed if this really is a bug.
Panelwrapper in ontouch raises an event (instead of callback) and returns true in any case.
Anyway if to set OnTouchListener using inline java, all works like expected.