I am working on a drawing project. My code is working perfectly other than canvas redo and undo operations. My undo operation removes paths from the paths Arr
The path is only shown when you finish drawing it which leaves the user clueless as to what he is drawing
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
for (Path p : paths){
canvas.drawPath(p, mPaint);
}
//Draw path along with the finger
canvas.drawPath(mPath, mPaint);
}
Add canvas.drawPath(mPath,mPaint) to onDraw() so the user gets a feeling of actually painting on the canvas.