quidone / react-native-wheel-picker

Wheel Picker for React Native
MIT License
23 stars 5 forks source link

Not responding to touch on Android #5

Open serhiijun opened 3 weeks ago

serhiijun commented 3 weeks ago

The component works fine on iOS, but on Android (both in the simulator and on real devices), it does not respond to touch when trying to scroll. I am using Expo, and this is a common issue when using import { ScrollView } from "react-native";. Therefore, we are using import { ScrollView } from "react-native-gesture-handler"; instead.

However, I am unsure how to apply this fix to the current library. I attempted to fork the library and replace ScrollView imports with react-native-gesture-handler, but this did not resolve the issue.

For context, I am using your component inside a BottomSheet from @gorhom/bottom-sheet (import BottomSheetModal, { BottomSheetBackdrop } from "@gorhom/bottom-sheet";).

rozhkovs commented 3 weeks ago

Can you please send a link to the general problem? I assume that the ScrollView from "react-native" conflicts when there are gesture handlers from "react-native-gesture-handler"on top

Does the ScrollView from the "react-native-gesture-handler" work inside the BottomSheet?

I'm not sure if it's enough to just replace the ScrollView from the "react-native-gesture-handler". You may need to redo the animations to "react-native-reanimated"

In a good way, "react-native-reanimated" and "react-native-gesture-handler" have become a kind of standard and the library probably needs to be redone for this.

shoma-mano commented 2 weeks ago

I face the same issue when using this with @gorhom/bottom-sheet.

I solved this problem in my folk.

@serhiijun For a temporary workaround, you can use this. I confirmed this worked in my project.

As @rozhkovs said, I migrated to react-native-reanimated from react-native, and added feature to replace ScrollView because migrating was not enough to work with @gorhom/bottom-sheet.

Just in case, I will create PR. I hope this helps!

rozhkovs commented 1 week ago

I assume that the problem arises precisely when used inside the BottomSheet. Here I described the nearest plan for completion