Private Sub WindowBase_Touch (Action As Int, X As Float, Y As Float)
If Action = WindowBase.TOUCH_ACTION_DOWN Then
MousePressedX = X
Else If Action = WindowBase.TOUCH_ACTION_UP Then
If X > MousePressedX + 50dip Then
PrevImage
Else if X < MousePressedX - 50dip Then
NextImage
Else '<------------------ add this
CallSub(mCallback, mEventName & _Click")
End If
End If
End Sub
Thanks Erel, i follow you code and i add this line
B4X:
Private Sub WindowBase_Touch (Action As Int, X As Float, Y As Float)
If Action = WindowBase.TOUCH_ACTION_DOWN Then
MousePressedX = X
Else If Action = WindowBase.TOUCH_ACTION_UP Then
If X > MousePressedX + 50dip Then
PrevImage
Else if X < MousePressedX - 50dip Then
NextImage
Else '<------------------ add this
CallSub2(mCallBack, mEventName & "_Click",CurrentIndex)
End If
End If
End Sub
'
Private Sub Click(index As Int)
Return index
End Sub
Thanks Erel, i follow you code and i add this line
B4X:
Private Sub WindowBase_Touch (Action As Int, X As Float, Y As Float)
If Action = WindowBase.TOUCH_ACTION_DOWN Then
MousePressedX = X
Else If Action = WindowBase.TOUCH_ACTION_UP Then
If X > MousePressedX + 50dip Then
PrevImage
Else if X < MousePressedX - 50dip Then
NextImage
Else '<------------------ add this
CallSub2(mCallBack, mEventName & "_Click",CurrentIndex)
End If
End If
End Sub
'
Private Sub Click(index As Int)
Return index
End Sub