I have an activity in whose oncreate event I start a custom view embedded from xml.The on draw method of the view draws a curve based on the x,y points calculated from the main activity.
Once the curve is drawn I want to reset the canvas back to the original screen, so that I can again call the ondraw for drawing the curve this time with different vale of x-y co-ordinates.Is this possible to achieve ?I want to do this 7 times.
If you call your custom view’s invalidate() method. It will tell your view to redraw itself. So what you can do, is create a method that changes those x and y co-ordinates, then call invalidate so that it will redraw it using your new vales.
I am not 100% if this is what you are looking for, so post some code, and we can see what we can do to help.
EDIT:
After doing some more work, I have also found that viewObject.postInvalidate() works as well. In the case of what I am doing, it works better!