invalidate the canvas after every touch event

This commit is contained in:
tibbi 2016-02-15 21:31:34 +01:00
parent 3af4509b1c
commit 3afc9e53dd
1 changed files with 2 additions and 3 deletions

View File

@ -66,20 +66,19 @@ public class MyCanvas extends View {
startX = x; startX = x;
startY = y; startY = y;
actionDown(x, y); actionDown(x, y);
invalidate();
break; break;
case MotionEvent.ACTION_MOVE: case MotionEvent.ACTION_MOVE:
actionMove(x, y); actionMove(x, y);
invalidate();
break; break;
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
actionUp(); actionUp();
invalidate();
break; break;
default: default:
break; break;
} }
invalidate();
return true; return true;
} }
} }