From b7ee6adaded19b2e11da348079577c498d019d37 Mon Sep 17 00:00:00 2001 From: Fred Liu Date: Thu, 15 Sep 2016 11:54:08 -0700 Subject: [PATCH] Reverted commit D3870895 Reviewed By: foghina Differential Revision: D3870895 fbshipit-source-id: 305534c752d1041bf03e27f28d6b5bf0a66a5a61 --- .../java/com/facebook/react/views/scroll/BUCK | 1 - .../react/views/scroll/ReactScrollView.java | 21 ++----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK index 1b987d814..22caa2763 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK @@ -10,7 +10,6 @@ android_library( react_native_target('java/com/facebook/react/touch:touch'), react_native_target('java/com/facebook/react/uimanager:uimanager'), react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), - react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), react_native_dep('third-party/java/infer-annotations:infer-annotations'), react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_dep('third-party/android/support/v4:lib-support-v4'), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java index cf498fceb..f8d6acc74 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java @@ -20,9 +20,7 @@ import android.view.View; import android.widget.OverScroller; import android.widget.ScrollView; -import com.facebook.common.logging.FLog; import com.facebook.infer.annotation.Assertions; -import com.facebook.react.bridge.JSApplicationCausedNativeException; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.common.ReactConstants; @@ -31,7 +29,6 @@ import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.events.NativeGestureUtil; import com.facebook.react.uimanager.ReactClippingViewGroup; import com.facebook.react.uimanager.ReactClippingViewGroupHelper; -import com.facebook.react.uimanager.ViewGroupManager; import com.facebook.react.views.view.ReactViewGroup; import com.facebook.react.views.view.ReactViewManager; @@ -50,7 +47,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou private static Field sScrollerField; private static boolean sTriedToGetScrollerField = false; - private static boolean sHasWarnedAboutStickyHeaders = false; private final OnScrollDispatchHelper mOnScrollDispatchHelper = new OnScrollDispatchHelper(); private final OverScroller mScroller; @@ -67,7 +63,7 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou private @Nullable Drawable mEndBackground; private int mEndFillColor = Color.TRANSPARENT; private @Nullable int[] mStickyHeaderIndices; - private ViewGroupManager mViewManager; + private ReactViewManager mViewManager; private final ReactViewGroup.ChildDrawingOrderDelegate mContentDrawingOrderDelegate = new ReactViewGroup.ChildDrawingOrderDelegate() { @@ -85,7 +81,7 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou super(context); UIManagerModule uiManager = context.getNativeModule(UIManagerModule.class); - mViewManager = (ViewGroupManager) uiManager.getUIImplementation().getViewManager(ReactViewManager.REACT_CLASS); + mViewManager = (ReactViewManager) uiManager.getUIImplementation().getViewManager(ReactViewManager.REACT_CLASS); mFpsListener = fpsListener; @@ -354,19 +350,6 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou View previousHeader = null; View currentHeader = null; View nextHeader = null; - View firstChild = getChildAt(0); - - if (!(firstChild instanceof ReactViewGroup)) { - if (!sHasWarnedAboutStickyHeaders) { - FLog.w( - ReactConstants.TAG, - "'stickyHeaderIndices' isn't a supported prop type for this UIImplementation (nodes). " + - "It'd be awesome if you could help us support it by sending a diff or PR :)"); - sHasWarnedAboutStickyHeaders = true; - } - return; - } - ReactViewGroup contentView = (ReactViewGroup) getChildAt(0); if (contentView == null) { return;