Android Question ACTION_POINTER_DOWN etc

SteveTerrell

Active Member
Licensed User
Longtime User
In an Activity it is possible to use Activity.ACTION_DOWN etc. to compare with MotionEvent actions and avoid having to use the values for those actions.

How can this be done in a class?

Me.ACTION_DOWN does not work

Steve
 

SteveTerrell

Active Member
Licensed User
Longtime User
You can pass the Activity object to a class. However it will be simpler to just use these constants instead:
B4X:
Private ACTION_UP = 1, ACTION_MOVE = 2, ACTION_DOWN = 0 As Int

As usual, thanks for the quick reply.


I now have a different question, but related to your answer.

If I store an instance of a class in a map or list will each stored instance include a set of the above constants (if I use the Private int approach)?


Steve
 
Upvote 0
Top