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?
- Set the
boolean onDrawWorkingflag (which is 'true' at the beginning of the method,falseat the end), and callonDrawfromonTouchEventonly if the flag isfalse
or
Add the variable
long timeWhenOnDrawFinished, which at the beginning of theonDraw = nullmethod 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.? Are there any other options?
What are the + and - first two solutions? Shde can read about similar solutions?