Fixing RTL HorizontalScrolling in Android

Reviewed By: astreet

Differential Revision: D5638458

fbshipit-source-id: 08a5070a362eb43e12140cc204172d0950a1b720
This commit is contained in:
David Vacca
2017-10-26 11:09:40 -07:00
committed by Facebook Github Bot
parent 1c104310fb
commit 36c951d24f
5 changed files with 76 additions and 1 deletions

View File

@@ -659,10 +659,11 @@ const ScrollView = createReactClass({
} else if (Platform.OS === 'android') {
if (this.props.horizontal) {
ScrollViewClass = AndroidHorizontalScrollView;
ScrollContentContainerViewClass = AndroidHorizontalScrollContentView;
} else {
ScrollViewClass = AndroidScrollView;
ScrollContentContainerViewClass = View;
}
ScrollContentContainerViewClass = View;
}
invariant(
@@ -880,6 +881,7 @@ const styles = StyleSheet.create({
let nativeOnlyProps,
AndroidScrollView,
AndroidHorizontalScrollContentView,
AndroidHorizontalScrollView,
RCTScrollView,
RCTScrollContentView;
@@ -899,6 +901,9 @@ if (Platform.OS === 'android') {
(ScrollView: React.ComponentType<any>),
nativeOnlyProps
);
AndroidHorizontalScrollContentView = requireNativeComponent(
'AndroidHorizontalScrollContentView'
);
} else if (Platform.OS === 'ios') {
nativeOnlyProps = {
nativeOnly: {