What I want to do is to draw a line that will follow my finger. I\'ve created
a custom view, and I have an onTouchEvent() that works.
I can draw a sta
You're only tracking the up and down events. Track the ACTION_MOVE event too. Beware that it will track continuously, even if the person's finger isn't apparently moving. Your code should go something like this:
ACTION_DOWN: Store position.
ACTION_MOVE: If position is different from stored position then draw a line from stored position to current position, and update stored position to current.
ACTION_UP: Stop.
In the ACTION_MOVE bit, it might be a good idea to check if the position is at least 2 or 3 pixels away from the stored position. If you're going to store all of the plot points, so you can do something with the data later, then maybe increase that to 10 pixels so you don't end up with hundreds of points for a simple line.