Android Question GestureDetector onTouch event error 'boolean java.lang.Boolean.booleanValue()'

rp.es

Member
I'm using 3 GestureDetectors for 3 panel that are sliding horizontally in activity with onDrag event( i change panels left).
And i need to detect the end of a drag action, so i use onTouch event to detect that. i have some checking in onTouch event and then return true .
The problem i sometime get the 'boolean java.lang.Boolean.booleanValue()' exception . not always but sometimes. i thing i am not suppose to write anything in onTouch event, but i dont know where to put it.any idea how to avoid the exception ?

Code: Copy
Sub Gesture1_onDrag(deltaX As Float, deltaY As Float, MotionEvent As Object)
    Try
        pnlSlide(1).Left = Max(0, Min(pnlSlide(1).Left + deltaX, 100%x - pnlSlide(1).Width))
    Catch
        Log(LastException)
    End Try
    
End Sub

Sub Gesture1_onTouch(Action As Int, X As Float, Y As Float, MotionEvent As Object) As Boolean
    Try
        If Action = Activity.ACTION_UP Then DragComplete
    Catch
        Log(LastException)
    End Try
    
    Return True
End Sub
 
Back
Top