Allow for customization of the RootViewManager

Summary:
Groups encountered a pretty major crash where, in many cases,
we would find that DrawCommands and Views were out of sync. This
turns out to be due to the fact that when we drop views from the
root view, we remove each child using removeChildAt (which ultimately
causes an invalidate and redraw). If this happens for a
FlatViewGroup, this causes issues where the Views are all removed,
but there are some DrawCommands (potentially DrawViews) that aren't
removed, hence them going out of sync.

Reviewed By: astreet

Differential Revision: D3473916
This commit is contained in:
Ahmed El-Helw
2016-06-23 12:25:39 -07:00
parent f223335dae
commit f602640e5c
4 changed files with 38 additions and 1 deletions

View File

@@ -23,4 +23,9 @@ abstract class FlatViewManager extends ViewGroupManager<FlatViewGroup> {
public void setBackgroundColor(FlatViewGroup view, int backgroundColor) {
// suppress
}
@Override
public void removeAllViews(FlatViewGroup parent) {
parent.removeAllViewsInLayout();
}
}