mardi 12 août 2014

Découvre - DispatchDraw (Android) - Stack Overflow


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!



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!


0 commentaires:

Enregistrer un commentaire