Turn FlatViewManager into ViewGroupManager

Summary: Views that can contain other Views need to have their ViewManager to extend ViewGroupManager. Otherwise, it may not remove child Views correctly when a parent View is being detached. This diff is changing FlatViewManager that create FlatViewGroups (that can have child Views) to extend from ViewGroupManager.

Reviewed By: ahmedre

Differential Revision: D2768667
This commit is contained in:
Denis Koroskin 2015-12-17 13:30:35 -08:00 committed by Ahmed El-Helw
parent 94052261d1
commit 85cdfcd1f7
4 changed files with 5 additions and 9 deletions

View File

@ -10,9 +10,9 @@
package com.facebook.react.flat;
import com.facebook.react.uimanager.ThemedReactContext;
import com.facebook.react.uimanager.BaseViewManager;
import com.facebook.react.uimanager.ViewGroupManager;
abstract class FlatViewManager<C extends FlatShadowNode> extends BaseViewManager<FlatViewGroup, C> {
abstract class FlatViewManager extends ViewGroupManager<FlatViewGroup> {
@Override
protected FlatViewGroup createViewInstance(ThemedReactContext reactContext) {
@ -23,8 +23,4 @@ abstract class FlatViewManager<C extends FlatShadowNode> extends BaseViewManager
public void setBackgroundColor(FlatViewGroup view, int backgroundColor) {
// suppress
}
@Override
public void updateExtraData(FlatViewGroup root, Object extraData) {
}
}

View File

@ -9,7 +9,7 @@
package com.facebook.react.flat;
/* package */ final class RCTImageViewManager extends FlatViewManager<RCTImageView> {
/* package */ final class RCTImageViewManager extends FlatViewManager {
@Override
public String getName() {

View File

@ -12,7 +12,7 @@ package com.facebook.react.flat;
/**
* ViewManager that creates instances of RCTText.
*/
/* package */ final class RCTTextManager extends FlatViewManager<RCTText> {
/* package */ final class RCTTextManager extends FlatViewManager {
@Override
public String getName() {

View File

@ -12,7 +12,7 @@ package com.facebook.react.flat;
/**
* ViewManager that creates instances of RCTView.
*/
/* package */ final class RCTViewManager extends FlatViewManager<RCTView> {
/* package */ final class RCTViewManager extends FlatViewManager {
@Override
public String getName() {