I am overriding the dispatchDraw method in a custom sub view and am wondering if its possible - since the dispatchDraw method is called just prior to drawing - if I can cancel the draw from within this method. The reason I wish to do so is because I'm validating user input in this method and if the user has input a value I do not like I do not want to draw it. Instead I will reset the values as if the user has NOT input anything new and keep the canvas the way it is. Thanks!
Asked
Active
Viewed 1,035 times
2
-
you can simply call setWillNotDraw(true); and invalidate(); to achieve that – 7heaven Sep 29 '16 at 10:19