How to implemement undo features in painting application in Android?

后端 未结 4 1611
情歌与酒
情歌与酒 2021-01-22 12:49

i want to do undo features in in my application.. for this i searched i net found that take arraylist of x,y points which i have done below code i am unable for undo the drawing

4条回答
  •  情歌与酒
    2021-01-22 13:49

    Hey I have used a kind of trick to remove the black line.In my erase button, I have set the color to white, instead of using XferMode..

      if(erase){
        paintColor = Color.parseColor(newColor);
        drawPaint.setColor(paintColor);
        }
    

提交回复
热议问题