From 86a5924dce83e9813201856ab7116ba865ae4d2d Mon Sep 17 00:00:00 2001 From: Fredrik Jeppsson Date: Tue, 3 Dec 2024 13:10:50 +0100 Subject: [PATCH 1/2] Using UIManager directly from react-native --- lib/AnySizeDragSortableView.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/AnySizeDragSortableView.js b/lib/AnySizeDragSortableView.js index 9450cbc..94b9951 100644 --- a/lib/AnySizeDragSortableView.js +++ b/lib/AnySizeDragSortableView.js @@ -1,16 +1,15 @@ import React from 'react'; import { - NativeModules, StyleSheet, ScrollView, View, PanResponder, LayoutAnimation, - Platform + Platform, + UIManager } from 'react-native'; const PropTypes = require('prop-types') const ANIM_DURATION = 300 -const { UIManager } = NativeModules; if (Platform.OS === 'android') { if (UIManager.setLayoutAnimationEnabledExperimental) { @@ -511,4 +510,4 @@ const styles = StyleSheet.create({ flexDirection: 'row', flexWrap: 'wrap' } -}); \ No newline at end of file +}); From 9849025a772ee92f877b4f96f5573bc1886ce0c0 Mon Sep 17 00:00:00 2001 From: Fredrik Jeppsson Date: Tue, 3 Dec 2024 13:11:48 +0100 Subject: [PATCH 2/2] Updated example Using UIManager directly from react-native --- Example/app/widget/AnySizeDragSortableView.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Example/app/widget/AnySizeDragSortableView.js b/Example/app/widget/AnySizeDragSortableView.js index 9450cbc..94b9951 100644 --- a/Example/app/widget/AnySizeDragSortableView.js +++ b/Example/app/widget/AnySizeDragSortableView.js @@ -1,16 +1,15 @@ import React from 'react'; import { - NativeModules, StyleSheet, ScrollView, View, PanResponder, LayoutAnimation, - Platform + Platform, + UIManager } from 'react-native'; const PropTypes = require('prop-types') const ANIM_DURATION = 300 -const { UIManager } = NativeModules; if (Platform.OS === 'android') { if (UIManager.setLayoutAnimationEnabledExperimental) { @@ -511,4 +510,4 @@ const styles = StyleSheet.create({ flexDirection: 'row', flexWrap: 'wrap' } -}); \ No newline at end of file +});