Dispatch View#onVisibilityAggregated to views becoming invisible
When a view becomes newly invisible/gone via setFlags, its visibility state will have already changed by the time we dispatchVisibilityAggregated. Since we already do visibility filtering in the ViewGroup override when we traverse to child views, permit the normal View implementation to dispatch onVisibilityAggregated if we're not visible and dispatching visibility false. Bug 28123146 Change-Id: I528dffe95d2057ef938508b9fb4219c5338b060c
This commit is contained in:
@@ -10278,7 +10278,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
*/
|
||||
@Visibility boolean dispatchVisibilityAggregated(boolean isVisible) {
|
||||
final boolean thisVisible = getVisibility() == VISIBLE;
|
||||
if (thisVisible) {
|
||||
// If we're not visible but something is telling us we are, ignore it.
|
||||
if (thisVisible || !isVisible) {
|
||||
onVisibilityAggregated(isVisible);
|
||||
}
|
||||
return thisVisible && isVisible;
|
||||
|
||||
Reference in New Issue
Block a user