mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-08 22:42:05 +08:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user