diff --git a/Libraries/Components/ScrollView/ScrollViewViewConfig.js b/Libraries/Components/ScrollView/ScrollViewViewConfig.js index c9603784a855a6..19818e0fae8440 100644 --- a/Libraries/Components/ScrollView/ScrollViewViewConfig.js +++ b/Libraries/Components/ScrollView/ScrollViewViewConfig.js @@ -10,7 +10,7 @@ 'use strict'; -import type {PartialViewConfig} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; +import type {PartialViewConfig} from '../../Renderer/shims/ReactNativeTypes'; const ScrollViewViewConfig = { uiViewClassName: 'RCTScrollView', @@ -28,15 +28,22 @@ const ScrollViewViewConfig = { bouncesZoom: true, canCancelContentTouches: true, centerContent: true, - contentInset: {diff: require('../../Utilities/differ/pointsDiffer')}, - contentOffset: {diff: require('../../Utilities/differ/pointsDiffer')}, + contentInset: { + diff: require('../../Utilities/differ/pointsDiffer'), + }, + contentOffset: { + diff: require('../../Utilities/differ/pointsDiffer'), + }, contentInsetAdjustmentBehavior: true, decelerationRate: true, directionalLockEnabled: true, disableIntervalMomentum: true, - endFillColor: {process: require('../../StyleSheet/processColor')}, + endFillColor: { + process: require('../../StyleSheet/processColor'), + }, fadingEdgeLength: true, indicatorStyle: true, + inverted: true, keyboardDismissMode: true, maintainVisibleContentPosition: true, maximumZoomScale: true, diff --git a/Libraries/ReactNative/getNativeComponentAttributes.js b/Libraries/ReactNative/getNativeComponentAttributes.js index b31603098a5dbf..732e9b6745cfe7 100644 --- a/Libraries/ReactNative/getNativeComponentAttributes.js +++ b/Libraries/ReactNative/getNativeComponentAttributes.js @@ -154,7 +154,8 @@ function getDifferForType( case 'UIEdgeInsets': return insetsDiffer; // Android Types - // (not yet implemented) + case 'Point': + return pointsDiffer; } return null; } diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java index 23ad78a5a880a8..c9733b096970ac 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.java @@ -305,7 +305,7 @@ public void setFadingEdgeLength(ReactScrollView view, int value) { } } - @ReactProp(name = "contentOffset") + @ReactProp(name = "contentOffset", customType = "Point") public void setContentOffset(ReactScrollView view, ReadableMap value) { if (value != null) { double x = value.hasKey("x") ? value.getDouble("x") : 0;