I extended a View and call the invalidate() method to force redrawing. I only redraw a part off the View, but everything else is black.
How can I stop clearing the screen before onDraw() is called?
you can use invalidate(Rect) or invalidate(left, top, right, bottom)
I don't think this work.
As I have used invalidate(Rect)
. In onDraw(Canvas)
, u can find the canvas height and width , the same as the view bounds. Canvas clip bounds is the same.
I think this might be work with a view group , but not a view.