I read about the invalidate overload that takes a rectangle, but I didn’t understand how I can determine that rectangle when onDraw is called (if I have a custom view and implement onDraw). Do I have to keep it in a member variable, so I will have access to it and then redraw only that rectangle, or am I supposed to ignore it altogether and redraw everything, letting Android handle it so that only the rectangle is actually refreshed?
Thanks.
I read about the invalidate overload that takes a rectangle, but I didn’t understand
Share
canvas.getClipBounds();
Additionally, anything you do in onDraw outside the invalidated region is ignored.