Sean
Sean

Reputation: 1123

How can I track a persons finger movement in android?

I am trying to create an app that has you put your finger on a starting point ( an area with 150dpx150dp) and have it go through a specific pattern (like a maze).

How should I go about doing this? (I'm used to using the given buttons to do things)

Upvotes: 0

Views: 2714

Answers (2)

mikek3332002
mikek3332002

Reputation: 3562

Handle the OnTouch Event to get the coordinates of the touch.

The event contains a instance of the MotionEvent class.

The process to move the object(eg current painting location) would be:

   b=get previous touch coordinates
   a=get cordinates of current touch  
   move object from location b to a

Upvotes: 2

Related Questions