It seems like Android really doesn't like invalidate (Rect dirty)
, which is used to invalidate only part of a canvas. When I invalidate part of a canvas (shown in green below) and a ToggleButton
outside of the canvas needs to be redrawn at the same time, the entire region shown in red is erased! It seems as though Android is just invalidating everything within the smallest rectangle encompassing the union of the two regions that need to be redrawn, even if one of the regions is outside of the View whose canvas I'm invalidating.
Is this standard behaviour, and if so, why would anyone use partial invalidation?