From b0319f3293b553c105b813dd12bff7d55940e60b Mon Sep 17 00:00:00 2001 From: "Andrew Chen (Eng)" Date: Tue, 9 Jan 2018 18:46:42 -0800 Subject: [PATCH] Fix ReactScrollView lints Differential Revision: D6689492 fbshipit-source-id: c55f98f3ed25757ec192a023d2dd60c73aae8df2 --- .../facebook/react/views/scroll/ReactScrollView.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 58afb66e3..cae6588f2 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 @@ -14,6 +14,7 @@ import android.graphics.Color; import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; +import android.support.v4.view.ViewCompat; import android.util.Log; import android.view.MotionEvent; import android.view.View; @@ -269,7 +270,7 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou 0, scrollWindowHeight / 2); - postInvalidateOnAnimation(); + ViewCompat.postInvalidateOnAnimation(this); // END FB SCROLLVIEW CHANGE } else { @@ -289,11 +290,14 @@ public class ReactScrollView extends ScrollView implements ReactClippingViewGrou ReactScrollViewHelper.emitScrollMomentumEndEvent(ReactScrollView.this); } else { mDoneFlinging = true; - ReactScrollView.this.postOnAnimationDelayed(this, ReactScrollViewHelper.MOMENTUM_DELAY); + ViewCompat.postOnAnimationDelayed( + ReactScrollView.this, + this, + ReactScrollViewHelper.MOMENTUM_DELAY); } } }; - postOnAnimationDelayed(r, ReactScrollViewHelper.MOMENTUM_DELAY); + ViewCompat.postOnAnimationDelayed(this, r, ReactScrollViewHelper.MOMENTUM_DELAY); } }