开发者

android problem with thread

I am working with a drawing application. ON A CANVAS i able to draw something as free hand. What i am doing here, i just store the paths in a List<pa开发者_JAVA技巧th> and drawing on canvas synchronized by a thread. when i am starting to draw for 1st time it is so smooth and speed also, but as paths are increased List<Path> size also increased so it becomes so slow , so terrible. if i clear the List then again it becomes smoother.

But i want for every time it should be smoother. How can i do it?

IS there any way?

Thank you


I think if you are using invalidate to refresh the screen on a View, only invalidate the area where you drew the new line. So the system will not keep drawing everything. Other option is you handle the event and you keep one list for your undo redo purposes and another smaller detailed list for actual drawing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜