CanvasView
CanvasView copied to clipboard
Clearing screen makes drawing laggy.
After clearing screen drawing becomes laggy.. Also eraser is not clearing the drawing its changing stoke color to white. It doesn't works on other background color.
I'm sorry to late reply. Thank you for posting issue.
- I'm sorry to late reply. Thank you for posting issue.
-> I think that this issue requires time for resolution (I don't have Android... So, I checked this issue by emulator).
- Also eraser is not clearing the drawing its changing stoke color to white. It doesn't works on other backgrounf color.
-> This issue can be resolved by method that sets background color ("setBaseColor" method).
Thank you !!
Its solution Laggy clear Canvas....
create canvas
- Create canvas and add in linear group canvas = new CanvasView(this); canvas.setPaintStrokeWidth(10); canvas.setPaintStyle(Paint.Style.STROKE); canvas.setDrawer(CanvasView.Drawer.PEN); viewGroupParent = new ViewGroupParent(); lincanvas.addView(canvas);
clear
-
Remove canvas and create again.
lincanvas.removeView(canvas); canvas = new CanvasView(this); canvas.setPaintStrokeWidth(10); canvas.setPaintStyle(Paint.Style.STROKE); canvas.setDrawer(CanvasView.Drawer.PEN); viewGroupParent = new ViewGroupParent(); lincanvas.addView(canvas);