mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
f602640e5c
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
23 lines
601 B
Java
23 lines
601 B
Java
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
package com.facebook.react.flat;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import com.facebook.react.uimanager.RootViewManager;
|
|
|
|
/* package */ class FlatRootViewManager extends RootViewManager {
|
|
|
|
@Override
|
|
public void removeAllViews(ViewGroup parent) {
|
|
parent.removeAllViewsInLayout();
|
|
}
|
|
}
|