So, I'm experimenting with "painting" paths that follow the users finger on touch. I first referred to this tutorial which worked yet had an obvious problem that it wouldn't connect the points of touch. So, I found this question that referred directly to the same tutorial and problem. I used johncarl's solution on this link on the part dealing with cubic splines and found it very useful. However, I noticed that when you remove your finger from the screen (ACTION_UP) and then place it back down again (ACTION_DOWN), it connects the last point to this new point and changes the path a bit.
Now, my question is, how would you be able to start a new path once the user removes there finger and places it back on the screen? What I mean is that the new point will not connect to the last point.
I've tried a few things, my newest attempt being this:
else if (event.getAction() == MotionEvent.ACTION_UP){
for (int i = 0; i <= points.size() - 1; i++){
points.remove(i);
}
}
The above code was an add on to the if statement in the onTouch() method. Though, this doesn't seem to do much at all. If you could provide any help it would be greatly appreciated, thanks!