After onTouchEvent you need to draw onDraw to the Canvas , and onTouchEvent is called more often than it manages to work onDraw . Which solution is better? Are there any other solutions?

  1. Set the boolean onDrawWorking flag (which is 'true' at the beginning of the method, false at the end), and call onDraw from onTouchEvent only if the flag is false

or

  1. Add the variable long timeWhenOnDrawFinished , which at the beginning of the onDraw = null method and at the end takes the value of the time when the method has finished its work. Then I can control the time, and run it with a certain delay.

  2. ? Are there any other options?

What are the + and - first two solutions? Shde can read about similar solutions?

    0