@build-break revert of D2217731

Differential Revision: D2702368

fb-gh-sync-id: 64f53168610c5bf5f3dc22cd7e4dd6b4bb620b4c
This commit is contained in:
Der-Nien Lee
2015-11-29 17:22:04 -08:00
committed by facebook-github-bot-7
parent 593a45e319
commit e8e7a2db57
17 changed files with 5 additions and 668 deletions

View File

@@ -29,11 +29,9 @@ import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.SoftAssertions;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.touch.JSResponderHandler;
import com.facebook.react.uimanager.layoutanimation.LayoutAnimationController;
/**
* Delegate of {@link UIManagerModule} that owns the native view hierarchy and mapping between
@@ -68,9 +66,6 @@ import com.facebook.react.uimanager.layoutanimation.LayoutAnimationController;
private final ViewManagerRegistry mViewManagers;
private final JSResponderHandler mJSResponderHandler = new JSResponderHandler();
private final RootViewManager mRootViewManager = new RootViewManager();
private final LayoutAnimationController mLayoutAnimator = new LayoutAnimationController();
private boolean mLayoutAnimationEnabled;
public NativeViewHierarchyManager(ViewManagerRegistry viewManagers) {
mAnimationRegistry = new AnimationRegistry();
@@ -85,10 +80,6 @@ import com.facebook.react.uimanager.layoutanimation.LayoutAnimationController;
return mAnimationRegistry;
}
public void setLayoutAnimationEnabled(boolean enabled) {
mLayoutAnimationEnabled = enabled;
}
public void updateProperties(int tag, CatalystStylesDiffMap props) {
UiThreadUtil.assertOnUiThread();
@@ -163,17 +154,8 @@ import com.facebook.react.uimanager.layoutanimation.LayoutAnimationController;
}
if (parentViewGroupManager != null
&& !parentViewGroupManager.needsCustomLayoutForChildren()) {
updateLayout(viewToUpdate, x, y, width, height);
viewToUpdate.layout(x, y, x + width, y + height);
}
} else {
updateLayout(viewToUpdate, x, y, width, height);
}
}
private void updateLayout(View viewToUpdate, int x, int y, int width, int height) {
if (mLayoutAnimationEnabled &&
mLayoutAnimator.shouldAnimateLayout(viewToUpdate)) {
mLayoutAnimator.applyLayoutUpdate(viewToUpdate, x, y, width, height);
} else {
viewToUpdate.layout(x, y, x + width, y + height);
}
@@ -488,14 +470,6 @@ import com.facebook.react.uimanager.layoutanimation.LayoutAnimationController;
mJSResponderHandler.clearJSResponder();
}
void configureLayoutAnimation(final ReadableMap config) {
mLayoutAnimator.initializeFromConfig(config);
}
void clearLayoutAnimation() {
mLayoutAnimator.reset();
}
/* package */ void startAnimationForNativeView(
int reactTag,
Animation animation,