[BUG?] Panel Touch

Alex69

Member
Licensed User
Longtime User
Hi,
Trying to catch Panel_Touch event , encountered some strange problems.

- Action_UP is catched ONLY if the track of my finger is approximately linear
- Action_MOVE has the same problem , example: while my finger moves linearly , everything is OK , but if my finger goes down (not leaving panel) , Action_MOVE is lost
- Sometimes saw in the debugger line "Activity_TOUCH was ignored"

Moreover , sometimes with dialogs receive this error:

"java.lang.RuntimeException: MotionEvent { action=ACTION_UP, id[0]=0, x[0]=341.0, y[0]=243.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=4298363, downTime=4297626, deviceId=3, source=0x1002 } recycled twice!"

Please help
Alex
 

ta1dr

Member
Licensed User
Longtime User
I think I have same problem I want to enable/disable panel (other) for finger move but only one way work (allways label1=true)

B4X:
Sub appanel_Touch (Action As Int, X As Float, Y As Float)
    Dim nx,ny,ox,oy As Float
   Select Action
          Case 0'Activity.ACTION_DOWN
               ox=X
               oy=Y
            'my_kbd.Visible=Not(my_kbd.Visible)
         Case 2 
             nx=X
               ny=Y
            'label1.Text=X & "    " & Y
            If (Y-10dip) < oy Then
               my_kbd.Visible=False
               label1.Text="FALSE"
               'Activity.Invalidate
            End If
      
            If (Y+10dip) > oy Then
               my_kbd.Visible=True
               label1.Text="TRUE"
               'Activity.Invalidate
            End If
         
         Case 1'Activity.ACTION_UP
           
   End Select   
End Sub
 
Last edited:
Upvote 0
Top