From 5d0d50cc44cfbbafc219aee07cc3faec61b7f36f Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 29 Mar 2019 00:39:43 -0700 Subject: [PATCH] Fix scrolling of Android Horizontal Scroll View Summary: This diff fixes the scrolling of Android Horizontal Scroll View, the root cause was that Binding was mounting a ScrollView instead of an AndroidHorizontalScrollView component. This will be automatically fixed when all the View components are autogenerated. Reviewed By: shergin Differential Revision: D14594622 fbshipit-source-id: 7c477ca167188ea9c473f61145461d3cf1696e17 --- .../main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp index 81a4ceb0572..3be8ba82e99 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jsi/jni/Binding.cpp @@ -445,8 +445,9 @@ void Binding::schedulerDidRequestPreliminaryViewAllocation( local_ref readableMap = castReadableMap(ReadableNativeMap::newObjectCxxArgs(shadowView.props->rawProps)); + auto component = getPlatformComponentName(shadowView); preallocateView( - javaUIManager_, surfaceId, shadowView.tag, make_jstring(shadowView.componentName).get(), readableMap.get(), isLayoutableShadowNode); + javaUIManager_, surfaceId, shadowView.tag, component.get(), readableMap.get(), isLayoutableShadowNode); } void Binding::registerNatives() {