In my application for an activity's setContentview()
I set a class which extends SurfaceView
.
At first when the app run I able to draw there on surface (bcz there i put Touch events in that class and using canvas i able to draw on that surface ), In a option menu click i want different drawings come on same screen/surface (means explicitly i want to draw circle or line on that same canvas)& it should be set to that surface. but how can i do this?
Is ther开发者_如何学Goe any way to call setcontview again then it may solve. U can see my code http://pastebin.com/DZ0hcH3j here.
Thank you
Call invalidate() on your view class. This will call your onDraw() eventually.
精彩评论