Fix invalidation bug with INVISIBLE views.
There was a bug in the invalidation code that prevented some animations fropm starting. An INVISIBLE view would mark some dirty flags then propagate the invaliation up the parent hierarchy. This would cause a redraw of the hierarchy, but would not include the invisible view (invisible children do not get drawn). Thus the flags wouldn't get cleared. Later, an animation to fade the view in (making it VISIBLE on start) would be started on the view. But the invalidation triggered by that animation would not propagate because the invisible view would see that it was already invalidated, and wouldn't send the message along. No invalidation means no drawing, so the animation wouldn't start because the invalidation didn't make it's way up to the top and the child's parent did not redraw. The fix is to noop the invalidate() call for GONE/INVISIBLE views which do not have animations set on them. Making these views VISIBLE later will trigger an invalidation, as will starting an animation on them, so the behavior should not change except for the buggy situation. Change-Id: I7a26a4bc7823f08fef56e52648e77ca256df6858
Loading
Please register or sign in to comment