How to get the pointer to canvas for a custom view in a user defined function in android
I have an activity which extends view i.e. its a custom view.I want to get the pointer to the canvas in my own function to draw something instead of the overridden ondraw/draw methods.Is it po开发者_开发问答ssible?
override ondraw(Canvas canvas)
and don't call super.ondraw()
. Call instead myCustomDraw(canvas) and draw to that canvas. That's the View's canvas
精彩评论