Android Question Action = 3 <- what is a 3

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I have the following sub for a panel touch

B4X:
sub PanelLine_Touch(Action As Int, X As Float, Y As Float)
       Log(Action)    ' This line sometimes reports 3
	
  	Select Action   
          Case Activity.ACTION_DOWN

          Case Activity.ACTION_UP
		   
          Case Activity.ACTION_MOVE
       End Select	
End Sub

The Log statement gives me 0, 1, 2 and sometimes a 3

What is a 3 for Action?

BobVal
 

barx

Well-Known Member
Licensed User
Longtime User
public static final int ACTION_CANCEL
Constant for getActionMasked(): The current gesture has been aborted. You will not receive any more points in it. You should treat this as an up event, but not perform any action that you normally would.

Constant Value: 3 (0x00000003)
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Barx:

Thanks, Wonder why this is not defined under Activity like ACTION_UP, ACTION_DOWN and ACTION_MOVE

At least now I know how to treat this.

Thanks again
 
Upvote 0
Top